SerializableTimeSignal.fromMap constructor
Creates a SerializableTimeSignal from a map structure, typically received from the platform-specific code.
The map must contain:
- 'acquisitionEstimatedErrorMillis' as an integer
- Optional 'currentInstant' as a map that can be parsed by SerializableCurrentInstant.fromMap
Implementation
factory SerializableTimeSignal.fromMap(Map<Object?, Object?> map) {
return SerializableTimeSignal(
acquisitionEstimatedErrorMillis:
map['acquisitionEstimatedErrorMillis'] as int,
currentInstant:
map['currentInstant'] != null
? SerializableCurrentInstant.fromMap(
map['currentInstant'] as Map<Object?, Object?>,
)
: null,
);
}