lat_lng.dart 446 B

123456789101112131415161718192021222324
  1. import "codable.dart";
  2. class LatLng implements Codable {
  3. double? latitude;
  4. double? longitude;
  5. LatLng({required this.latitude, required this.longitude});
  6. @override
  7. Map<String, dynamic> toJson() {
  8. return {
  9. 'latitude': latitude,
  10. 'longitude': longitude,
  11. };
  12. }
  13. factory LatLng.fromJson(Map<String, dynamic> map) {
  14. return LatLng(
  15. latitude: map['latitude'],
  16. longitude: map['longitude'],
  17. );
  18. }
  19. }