ActivityEvent.fromJson constructor Null safety

ActivityEvent.fromJson(
  1. dynamic json
)

Implementation

factory ActivityEvent.fromJson(dynamic json) {
  return ActivityEvent(
    ActivityType._(json["type"] as int),
    json["startTime"] as Int64,
    json["endTime"] as Int64,
    json["startLatitude"] as double,
    json["startLongitude"] as double,
    json["endLatitude"] as double,
    json["endLongitude"] as double,
    json["distance"] as int,
    json["airDistance"] as int,
    json["maxDistance"] as int,
    json["eventSavedTime"] as Int64,
  );
}