File tree 25 files changed +60
-36
lines changed
simple_bloc_flutter/android
25 files changed +60
-36
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript {
5
5
}
6
6
7
7
dependencies {
8
- classpath ' com.android.tools.build:gradle:3.0.1 '
8
+ classpath ' com.android.tools.build:gradle:3.1.2 '
9
9
classpath ' com.google.gms:google-services:3.1.2'
10
10
}
11
11
}
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-4.1 -all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.4 -all.zip
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript {
5
5
}
6
6
7
7
dependencies {
8
- classpath ' com.android.tools.build:gradle:3.0.1 '
8
+ classpath ' com.android.tools.build:gradle:3.1.2 '
9
9
}
10
10
}
11
11
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-4.1 -all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.4 -all.zip
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript {
5
5
}
6
6
7
7
dependencies {
8
- classpath ' com.android.tools.build:gradle:3.0.1 '
8
+ classpath ' com.android.tools.build:gradle:3.1.2 '
9
9
classpath ' com.google.gms:google-services:3.2.1'
10
10
}
11
11
}
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-4.1 -all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.4 -all.zip
Original file line number Diff line number Diff line change @@ -61,16 +61,8 @@ class ReduxApp extends StatelessWidget {
61
61
FirestoreReduxLocalizationsDelegate (),
62
62
],
63
63
routes: {
64
- ArchSampleRoutes .home: (context) {
65
- return StoreBuilder <AppState >(
66
- builder: (context, store) {
67
- return HomeScreen ();
68
- },
69
- );
70
- },
71
- ArchSampleRoutes .addTodo: (context) {
72
- return AddTodo ();
73
- },
64
+ ArchSampleRoutes .home: (context) => HomeScreen (),
65
+ ArchSampleRoutes .addTodo: (context) => AddTodo (),
74
66
},
75
67
),
76
68
);
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ buildscript {
4
4
jcenter()
5
5
}
6
6
dependencies {
7
- classpath ' com.android.tools.build:gradle:3.0.1 '
7
+ classpath ' com.android.tools.build:gradle:3.1.2 '
8
8
}
9
9
}
10
10
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-4.1 -all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.4 -all.zip
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript {
5
5
}
6
6
7
7
dependencies {
8
- classpath ' com.android.tools.build:gradle:3.0.1 '
8
+ classpath ' com.android.tools.build:gradle:3.1.2 '
9
9
classpath ' com.google.gms:google-services:3.1.2'
10
10
}
11
11
}
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-4.1 -all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.4 -all.zip
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript {
5
5
}
6
6
7
7
dependencies {
8
- classpath ' com.android.tools.build:gradle:3.0.1 '
8
+ classpath ' com.android.tools.build:gradle:3.1.2 '
9
9
}
10
10
}
11
11
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-4.1 -all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.4 -all.zip
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript {
5
5
}
6
6
7
7
dependencies {
8
- classpath ' com.android.tools.build:gradle:3.0.1 '
8
+ classpath ' com.android.tools.build:gradle:3.1.2 '
9
9
}
10
10
}
11
11
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-4.1 -all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.4 -all.zip
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ class Stats extends StatelessWidget {
16
16
@override
17
17
Widget build (BuildContext context) {
18
18
return StoreConnector <AppState , _ViewModel >(
19
+ distinct: true ,
19
20
converter: _ViewModel .fromStore,
20
21
builder: (context, vm) {
21
22
return StatsCounter (
@@ -39,4 +40,20 @@ class _ViewModel {
39
40
numCompleted: numCompletedSelector (todosSelector (store.state)),
40
41
);
41
42
}
43
+
44
+ @override
45
+ bool operator == (Object other) =>
46
+ identical (this , other) ||
47
+ other is _ViewModel &&
48
+ runtimeType == other.runtimeType &&
49
+ numCompleted == other.numCompleted &&
50
+ numActive == other.numActive;
51
+
52
+ @override
53
+ int get hashCode => numCompleted.hashCode ^ numActive.hashCode;
54
+
55
+ @override
56
+ String toString () {
57
+ return '_ViewModel{numCompleted: $numCompleted , numActive: $numActive }' ;
58
+ }
42
59
}
Original file line number Diff line number Diff line change @@ -38,10 +38,9 @@ class ReduxApp extends StatelessWidget {
38
38
],
39
39
routes: {
40
40
ArchSampleRoutes .home: (context) {
41
- return StoreBuilder <AppState >(
42
- onInit: (store) => store.dispatch (LoadTodosAction ()),
43
- builder: (context, store) {
44
- return HomeScreen ();
41
+ return HomeScreen (
42
+ onInit: () {
43
+ StoreProvider .of <AppState >(context).dispatch (LoadTodosAction ());
45
44
},
46
45
);
47
46
},
Original file line number Diff line number Diff line change @@ -13,8 +13,23 @@ import 'package:redux_sample/containers/tab_selector.dart';
13
13
import 'package:redux_sample/localization.dart' ;
14
14
import 'package:redux_sample/models/models.dart' ;
15
15
16
- class HomeScreen extends StatelessWidget {
17
- HomeScreen () : super (key: ArchSampleKeys .homeScreen);
16
+ class HomeScreen extends StatefulWidget {
17
+ final void Function () onInit;
18
+
19
+ HomeScreen ({@required this .onInit}) : super (key: ArchSampleKeys .homeScreen);
20
+
21
+ @override
22
+ HomeScreenState createState () {
23
+ return new HomeScreenState ();
24
+ }
25
+ }
26
+
27
+ class HomeScreenState extends State <HomeScreen > {
28
+ @override
29
+ void initState () {
30
+ widget.onInit ();
31
+ super .initState ();
32
+ }
18
33
19
34
@override
20
35
Widget build (BuildContext context) {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript {
5
5
}
6
6
7
7
dependencies {
8
- classpath ' com.android.tools.build:gradle:3.0.1 '
8
+ classpath ' com.android.tools.build:gradle:3.1.2 '
9
9
}
10
10
}
11
11
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-4.1 -all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.4 -all.zip
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ buildscript {
5
5
}
6
6
7
7
dependencies {
8
- classpath ' com.android.tools.build:gradle:3.0.1 '
8
+ classpath ' com.android.tools.build:gradle:3.1.2 '
9
9
classpath ' com.google.gms:google-services:3.2.1'
10
10
}
11
11
}
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-4.1 -all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.4 -all.zip
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ buildscript {
4
4
jcenter()
5
5
}
6
6
dependencies {
7
- classpath ' com.android.tools.build:gradle:3.0.1 '
7
+ classpath ' com.android.tools.build:gradle:3.1.2 '
8
8
}
9
9
}
10
10
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
distributionPath =wrapper/dists
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
6
- distributionUrl =https\://services.gradle.org/distributions/gradle-4.1 -all.zip
6
+ distributionUrl =https\://services.gradle.org/distributions/gradle-4.4 -all.zip
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class ArchSampleTheme {
15
15
buttonColor: Colors .grey[800 ],
16
16
textSelectionColor: Colors .cyan[100 ],
17
17
backgroundColor: Colors .grey[800 ],
18
+ toggleableActiveColor: Colors .cyan[300 ],
18
19
textTheme: originalTextTheme.copyWith (
19
20
body1:
20
21
originalBody1.copyWith (decorationColor: Colors .transparent)));
You can’t perform that action at this time.
0 commit comments