class LocationModel { LocationModel({ required this.name, required this.address, required this.list, required this.latitude, required this.longitude, }); String name; String address; List list; double latitude; double longitude; factory LocationModel.fromJson(Map json) => LocationModel( name: json['name'], address: json['address'], list: List.from(json['list'].map((x) => x)), latitude: json['latitude'].toDouble(), longitude: json['longitude'].toDouble(), ); }