22 lines
468 B
Dart
22 lines
468 B
Dart
class LocationData {
|
|
LocationData({
|
|
this.type,
|
|
this.coordinates,});
|
|
|
|
LocationData.empty();
|
|
|
|
LocationData.fromJson(dynamic json) {
|
|
type = json['type'];
|
|
coordinates = json['coordinates'] != null ? json['coordinates'].cast<double>() : [];
|
|
}
|
|
String? type;
|
|
List<double>? coordinates;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['type'] = type;
|
|
map['coordinates'] = coordinates;
|
|
return map;
|
|
}
|
|
|
|
} |