MapxusLocationEvent.fromMap constructor

MapxusLocationEvent.fromMap(
  1. Map map
)

Implementation

factory MapxusLocationEvent.fromMap(Map<dynamic, dynamic> map) {
  return MapxusLocationEvent(
    latitude: (map['latitude'] ?? 0).toDouble(),
    longitude: (map['longitude'] ?? 0).toDouble(),
    accuracy: (map['accuracy'] ?? 0).toDouble(),
    venueId: map['venueId'],
    buildingId: map['buildingId'],
    floor: map['floor'],
    timestamp: map['timestamp'] ?? DateTime.now().millisecondsSinceEpoch,
    rawData: map
  );
}