15 lines
397 B
Dart
15 lines
397 B
Dart
import 'latlng.dart';
|
|
|
|
class Location {
|
|
final String? _address;
|
|
final LatLng? _coordinates;
|
|
|
|
Location({this._address, this._coordinates});
|
|
|
|
Location.fromAddress({required this._address}) : _coordinates = null;
|
|
Location.fromCoordinates({required this._coordinates}) : _address = null;
|
|
|
|
String get address => _address ?? '';
|
|
LatLng get coordinates => _coordinates ?? LatLng.empty();
|
|
}
|