You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
359 B
Dart
14 lines
359 B
Dart
|
2 months ago
|
class PlaceDetails {
|
||
|
|
final double lat;
|
||
|
|
final double lng;
|
||
|
|
|
||
|
|
PlaceDetails({required this.lat, required this.lng});
|
||
|
|
|
||
|
|
factory PlaceDetails.fromJson(Map<String, dynamic> json) {
|
||
|
|
final loc = json['result']['geometry']['location'];
|
||
|
|
return PlaceDetails(
|
||
|
|
lat: (loc['lat'] as num).toDouble(),
|
||
|
|
lng: (loc['lng'] as num).toDouble(),
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|