20 lines
501 B
Dart
20 lines
501 B
Dart
class LocationModel {
|
|
|
|
final double? latitude;
|
|
final double? longitude;
|
|
final String? address;
|
|
|
|
LocationModel({this.latitude, this.longitude, this.address});
|
|
|
|
factory LocationModel.fromJson(Map<String, dynamic> json) => LocationModel(
|
|
latitude: json["latitude"] as double?,
|
|
longitude: json["longitude"] as double?,
|
|
address: json["address"] as String?,
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"latitude": latitude,
|
|
"longitude": longitude,
|
|
"address": address,
|
|
};
|
|
} |