More redux work. User creation/retrieve
This commit is contained in:
parent
2c67b68512
commit
2dfa745c6a
16 changed files with 212 additions and 110 deletions
|
|
@ -11,13 +11,9 @@ part of 'appState.dart';
|
|||
AppState _$AppStateFromJson(Map<String, dynamic> json) => new AppState(
|
||||
yourLocations: (json['yourLocations'] as List)
|
||||
.map((e) => new YourLocation.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
userId: json['userId'] as String,
|
||||
token: json['token'] as String);
|
||||
.toList());
|
||||
|
||||
abstract class _$AppStateSerializerMixin {
|
||||
String get userId;
|
||||
String get token;
|
||||
List<YourLocation> get yourLocations;
|
||||
Map<String, dynamic> toJson() => new _$AppStateJsonMapWrapper(this);
|
||||
}
|
||||
|
|
@ -27,16 +23,12 @@ class _$AppStateJsonMapWrapper extends $JsonMapWrapper {
|
|||
_$AppStateJsonMapWrapper(this._v);
|
||||
|
||||
@override
|
||||
Iterable<String> get keys => const ['userId', 'token', 'yourLocations'];
|
||||
Iterable<String> get keys => const ['yourLocations'];
|
||||
|
||||
@override
|
||||
dynamic operator [](Object key) {
|
||||
if (key is String) {
|
||||
switch (key) {
|
||||
case 'userId':
|
||||
return _v.userId;
|
||||
case 'token':
|
||||
return _v.token;
|
||||
case 'yourLocations':
|
||||
return _v.yourLocations;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue