LocationDto.fromJson constructor
LocationDto.fromJson(
- Map json
Implementation
factory LocationDto.fromJson(Map<dynamic, dynamic> json) {
bool isLocationMocked =
Platform.isAndroid ? json[Keys.ARG_IS_MOCKED] : false;
return LocationDto._(
json[Keys.ARG_LATITUDE],
json[Keys.ARG_LONGITUDE],
json[Keys.ARG_ACCURACY],
json[Keys.ARG_ALTITUDE],
json[Keys.ARG_SPEED],
json[Keys.ARG_SPEED_ACCURACY],
json[Keys.ARG_HEADING],
json[Keys.ARG_TIME],
isLocationMocked,
json[Keys.ARG_PROVIDER] ?? '',
);
}