YourLocation and some persist work
This commit is contained in:
parent
6488957148
commit
c9941429f0
13 changed files with 240 additions and 85 deletions
|
|
@ -4,11 +4,10 @@ class BasicLocation extends Comparable<BasicLocation> {
|
|||
final double lat;
|
||||
final double lon;
|
||||
String description;
|
||||
bool subscribed;
|
||||
|
||||
static BasicLocation noLocation = new BasicLocation(lat: 0.0, lon: 0.0);
|
||||
// static BasicLocation noLocation = new BasicLocation(lat: 0.0, lon: 0.0);
|
||||
|
||||
BasicLocation({@required this.lat, @required this.lon, this.description, this.subscribed: false}) {
|
||||
BasicLocation({@required this.lat, @required this.lon, this.description}) {
|
||||
if (this.description == null)
|
||||
this.description = 'Position: ${this.lat}, ${this.lon}';
|
||||
}
|
||||
|
|
@ -26,10 +25,6 @@ class BasicLocation extends Comparable<BasicLocation> {
|
|||
return hash;
|
||||
}
|
||||
|
||||
bool get isSubscribed {
|
||||
return subscribed == null ? false : subscribed;
|
||||
}
|
||||
|
||||
BasicLocation.fromJson(Map<String, dynamic> json)
|
||||
: lat = json['lat'],
|
||||
lon = json['lon'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue