Persist your saved locations
This commit is contained in:
parent
c9941429f0
commit
0ad2fce4f3
5 changed files with 19 additions and 33 deletions
|
|
@ -58,21 +58,3 @@ class YourLocation extends Object with _$YourLocationSerializerMixin {
|
|||
description.hashCode ^
|
||||
subscribed.hashCode;
|
||||
}
|
||||
|
||||
class YourLocationRepository extends PreferencesRepository<YourLocation> {
|
||||
|
||||
static final repo = new YourLocationRepository();
|
||||
|
||||
YourLocationRepository() : super();
|
||||
|
||||
@override
|
||||
YourLocation deserialize(String s) {
|
||||
|
||||
return YourLocation.fromJson(json.decode(s));
|
||||
}
|
||||
|
||||
@override
|
||||
String serialize(YourLocation y) {
|
||||
return json.encode(y.toJson());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue