/// A one-shot location fix plus a best-effort place label. class LocationReading { const LocationReading({ required this.latitude, required this.longitude, required this.place, }); final double latitude; final double longitude; final String place; factory LocationReading.fromMap(Map map) { return LocationReading( latitude: (map['latitude'] as num?)?.toDouble() ?? 0, longitude: (map['longitude'] as num?)?.toDouble() ?? 0, place: ((map['place'] as String?) ?? '').trim(), ); } String get displayPlace => place.isEmpty ? 'Current location' : place; }