import 'package:google_maps_flutter/google_maps_flutter.dart'; class Place { final String? id, title, address; final LatLng? position; final int? distance; Place({ this.id, this.title, this.address, this.position, this.distance, }); factory Place.fromJson(Map json) { return Place( id: json['id'], title: json['title'], address: json['address']['label'], position: LatLng( json['position']['lat'], json['position']['lng'], ), distance: json['distance'], ); } }