extended location and latlng models
This commit is contained in:
@@ -12,4 +12,18 @@ class LatLng {
|
||||
Map<String, double> toJson() {
|
||||
return {'lat': lat, 'lng': lng};
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if (other is! LatLng) return false;
|
||||
return hashCode == other.hashCode;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(lat, lng);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return '${lat.toString()}, ${lng.toString()}';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user