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.
HMG_Patient_App_New/lib/features/location/PlaceDetails.dart

14 lines
359 B
Dart

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(),
);
}
}