UHeading.fromMap constructor

UHeading.fromMap(
  1. Map<Object?, Object?> m
)

Reads it from the native map.

Implementation

factory UHeading.fromMap(Map<Object?, Object?> m) => UHeading(
  magnetic: (m["magnetic"]! as num).toDouble(),
  trueNorth: (m["true"] as num?)?.toDouble(),
  accuracy: (m["accuracy"] as num?)?.toDouble(),
  time: DateTime.fromMillisecondsSinceEpoch((m["time"] as num?)?.toInt() ?? DateTime.now().millisecondsSinceEpoch),
);