More redux work. User creation/retrieve

This commit is contained in:
vjrj 2018-06-27 19:46:02 +02:00
parent 2c67b68512
commit 2dfa745c6a
16 changed files with 212 additions and 110 deletions

View file

@ -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;
}