File tree 7 files changed +295
-157
lines changed
7 files changed +295
-157
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ class _HomePageState extends State<HomePage>
86
86
label: const Text ('Change password' ),
87
87
icon: const Icon (Icons .lock_outline),
88
88
style: ElevatedButton .styleFrom (
89
- backgroundColor: Theme .of (context).backgroundColor ,
89
+ backgroundColor: Theme .of (context).colorScheme.surface ,
90
90
),
91
91
),
92
92
),
@@ -99,7 +99,7 @@ class _HomePageState extends State<HomePage>
99
99
label: const Text ('Logout' ),
100
100
icon: const Icon (Icons .exit_to_app),
101
101
style: ElevatedButton .styleFrom (
102
- backgroundColor: Theme .of (context).backgroundColor ,
102
+ backgroundColor: Theme .of (context).colorScheme.surface ,
103
103
),
104
104
),
105
105
),
@@ -111,7 +111,7 @@ class _HomePageState extends State<HomePage>
111
111
'Flutter auth BLoC pattern RxDart' ,
112
112
style: Theme .of (context)
113
113
.textTheme
114
- .subtitle1 !
114
+ .titleMedium !
115
115
.copyWith (fontSize: 16 ),
116
116
),
117
117
),
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ class HomeUserProfile extends StatelessWidget {
82
82
const SizedBox (height: 4 ),
83
83
Text (
84
84
'Error' ,
85
- style: themeData.textTheme.subtitle2 ! .copyWith (fontSize: 12 ),
85
+ style: themeData.textTheme.titleSmall ! .copyWith (fontSize: 12 ),
86
86
),
87
87
],
88
88
),
@@ -140,7 +140,7 @@ class HomeUserProfile extends StatelessWidget {
140
140
Expanded (
141
141
child: Text (
142
142
'Logging out...' ,
143
- style: Theme .of (context).textTheme.subtitle1 ,
143
+ style: Theme .of (context).textTheme.titleMedium ,
144
144
textAlign: TextAlign .center,
145
145
),
146
146
),
@@ -170,7 +170,7 @@ class ImageUploadingWidget extends StatelessWidget {
170
170
const SizedBox (height: 8 ),
171
171
Text (
172
172
'Uploading' ,
173
- style: Theme .of (context).textTheme.overline ,
173
+ style: Theme .of (context).textTheme.labelSmall ,
174
174
textAlign: TextAlign .center,
175
175
),
176
176
],
Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ class _MyLoginPageState extends State<LoginPage>
243
243
FocusScope .of (context).unfocus ();
244
244
loginBloc.submitLogin ();
245
245
},
246
- color: Theme .of (context).backgroundColor ,
246
+ color: Theme .of (context).colorScheme.surface ,
247
247
splashColor: Theme .of (context).colorScheme.secondary,
248
248
child: const Text (
249
249
'LOGIN' ,
Original file line number Diff line number Diff line change @@ -98,9 +98,9 @@ class _RegisterPageState extends State<RegisterPage>
98
98
color: Colors .transparent,
99
99
width: double .infinity,
100
100
height: kToolbarHeight,
101
- child: Row (
101
+ child: const Row (
102
102
crossAxisAlignment: CrossAxisAlignment .center,
103
- children: const [
103
+ children: [
104
104
BackButton (color: Colors .white),
105
105
],
106
106
),
@@ -235,7 +235,7 @@ class _RegisterPageState extends State<RegisterPage>
235
235
FocusScope .of (context).unfocus ();
236
236
registerBloc.submitRegister ();
237
237
},
238
- color: Theme .of (context).backgroundColor ,
238
+ color: Theme .of (context).colorScheme.surface ,
239
239
splashColor: Theme .of (context).colorScheme.secondary,
240
240
child: const Text (
241
241
'REGISTER' ,
Original file line number Diff line number Diff line change @@ -157,12 +157,12 @@ class _InputTokenAndResetPasswordPageState
157
157
},
158
158
);
159
159
160
- final overlayColor = MaterialStateProperty .resolveWith ((states) {
161
- if (states.contains (MaterialState .hovered)) {
160
+ final overlayColor = WidgetStateProperty .resolveWith ((states) {
161
+ if (states.contains (WidgetState .hovered)) {
162
162
return Theme .of (context).colorScheme.secondary.withOpacity (0.5 );
163
163
}
164
- if (states.contains (MaterialState .focused) ||
165
- states.contains (MaterialState .pressed)) {
164
+ if (states.contains (WidgetState .focused) ||
165
+ states.contains (WidgetState .pressed)) {
166
166
return Theme .of (context).colorScheme.secondary.withOpacity (0.8 );
167
167
}
168
168
return null ;
Original file line number Diff line number Diff line change @@ -91,12 +91,12 @@ class _SendEmailPageState extends State<SendEmailPage>
91
91
},
92
92
);
93
93
94
- final overlayColor = MaterialStateProperty .resolveWith ((states) {
95
- if (states.contains (MaterialState .hovered)) {
94
+ final overlayColor = WidgetStateProperty .resolveWith ((states) {
95
+ if (states.contains (WidgetState .hovered)) {
96
96
return Theme .of (context).colorScheme.secondary.withOpacity (0.5 );
97
97
}
98
- if (states.contains (MaterialState .focused) ||
99
- states.contains (MaterialState .pressed)) {
98
+ if (states.contains (WidgetState .focused) ||
99
+ states.contains (WidgetState .pressed)) {
100
100
return Theme .of (context).colorScheme.secondary.withOpacity (0.8 );
101
101
}
102
102
return null ;
You can’t perform that action at this time.
0 commit comments