Skip to content

Commit eac4938

Browse files
committed
升级flutter
1 parent 1b85dd3 commit eac4938

File tree

9 files changed

+105
-190
lines changed

9 files changed

+105
-190
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ Tools • Dart 2.3.0 (build 2.3.0-dev.0.1 cf4444b803)
7575
## `MacOS`
7676

7777
```bash
78-
Flutter 1.5.4-hotfix.2 • channel stable • https://github.com/flutter/flutter.git
79-
Framework • revision 7a4c33425d (8 weeks ago) • 2019-04-29 11:05:24 -0700
80-
Engine • revision 52c7a1e849
81-
Tools • Dart 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
78+
Flutter 1.7.8+hotfix.2 • channel stable • https://github.com/flutter/flutter.git
79+
Framework • revision 2e540931f7 (3 days ago) • 2019-07-09 13:14:38 -0700
80+
Engine • revision 54ad777fd2
81+
Tools • Dart 2.4.0
8282
```
8383

8484
## `Mobx``JSON`序列化构建

lib/models/login.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import 'package:json_annotation/json_annotation.dart';
2+
3+
part 'login.g.dart';
4+
5+
@JsonSerializable(nullable: false)
6+
class Person {
7+
final String firstName;
8+
final String lastName;
9+
final DateTime dateOfBirth;
10+
Person({this.firstName, this.lastName, this.dateOfBirth});
11+
factory Person.fromJson(Map<String, dynamic> json) => _$PersonFromJson(json);
12+
Map<String, dynamic> toJson() => _$PersonToJson(this);
13+
}

lib/models/login.g.dart

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/stores/findStore.g.dart

Lines changed: 0 additions & 63 deletions
This file was deleted.

lib/stores/loginStore.g.dart

Lines changed: 0 additions & 63 deletions
This file was deleted.

lib/stores/registerStore.g.dart

Lines changed: 0 additions & 24 deletions
This file was deleted.

lib/stores/state.dart

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// import 'package:localstorage/localstorage.dart';
2+
import 'package:mobx/mobx.dart';
3+
// import 'package:quich/services/api_service.dart';
4+
5+
part 'state.g.dart';
6+
7+
abstract class AppStoreBase implements Store {
8+
// LocalStorage storage = LocalStorage('quich');
9+
// final ApiService apiService = ApiService();
10+
/// MANY CODE HERE
11+
}
12+
13+
/* App store singletone */
14+
class AppStore extends AppStoreBase with _$AppStore {
15+
factory AppStore() {
16+
return _singleton;
17+
}
18+
19+
AppStore._internal();
20+
21+
AppStore reset() {
22+
return AppStore._internal();
23+
}
24+
25+
static final AppStore _singleton = AppStore._internal();
26+
@override
27+
void dispose() {
28+
print('DISPOSE STORE');
29+
}
30+
}
31+
32+
// AppStore $store = AppStore();

0 commit comments

Comments
 (0)