Skip to content

Commit 910ca0d

Browse files
committed
wip nnbd
1 parent 6bdf725 commit 910ca0d

File tree

12 files changed

+52
-51
lines changed

12 files changed

+52
-51
lines changed

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include: package:pedantic/analysis_options.1.9.0.yaml
1+
include: package:pedantic/analysis_options.1.11.0.yaml
22
linter:
33
rules:
44
- prefer_final_locals

lib/app.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@ class MyApp extends StatelessWidget {
2828
},
2929
RegisterPage.routeName: (context) {
3030
return BlocProvider<RegisterBloc>(
31-
child: const RegisterPage(),
3231
initBloc: (context) => RegisterBloc(
3332
RegisterUseCase(context.get()),
3433
),
34+
child: const RegisterPage(),
3535
);
3636
},
3737
HomePage.routeName: (context) {
3838
return BlocProvider<HomeBloc>(
39-
child: const HomePage(),
4039
initBloc: (context) {
4140
final userRepository = context.get<UserRepository>();
4241
return HomeBloc(
@@ -45,6 +44,7 @@ class MyApp extends StatelessWidget {
4544
UploadImageUseCase(userRepository),
4645
);
4746
},
47+
child: const HomePage(),
4848
);
4949
},
5050
LoginPage.routeName: (context) {

lib/data/remote/network_utils.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ void _logRequest(
1616
Map<String, String>? multipartFields,
1717
List<http.MultipartFile>? multipartFiles,
1818
}) {
19-
debugPrint('[http] --> ${method} ${url}');
19+
debugPrint('[http] --> $method $url');
2020
debugPrint('${_indent}headers: $headers');
2121

2222
if (method == 'POST' || method == 'PUT') {
2323
debugPrint('${_indent}body: $body');
2424

2525
if (method == 'POST') {
2626
if (multipartFields != null) {
27-
debugPrint('${_indent}multipartFields: ${multipartFields}');
27+
debugPrint('${_indent}multipartFields: $multipartFields');
2828
}
2929
if (multipartFields != null) {
30-
debugPrint('${_indent}multipartFiles: ${multipartFiles}');
30+
debugPrint('${_indent}multipartFiles: $multipartFiles');
3131
}
3232
}
3333
}

lib/pages/home/change_password/change_password_bloc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class ChangePasswordBloc extends DisposeCallbackBaseBloc {
143143
(error, message) => ChangePasswordState((b) => b
144144
..isLoading = false
145145
..error = error
146-
..message = 'Error when change password: ${message}'),
146+
..message = 'Error when change password: $message'),
147147
);
148148
}
149149

lib/pages/home/home_profile_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ class HomeUserProfile extends StatelessWidget {
8585
children: <Widget>[
8686
ClipOval(
8787
child: GestureDetector(
88-
child: image,
8988
onTap: () => _pickAndUploadImage(homeBloc),
89+
child: image,
9090
),
9191
),
9292
Expanded(

lib/pages/login/login_page.dart

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -212,21 +212,6 @@ class _MyLoginPageState extends State<LoginPage>
212212
Widget loginButton(LoginBloc loginBloc) {
213213
return AnimatedBuilder(
214214
animation: buttonSqueezeAnimation,
215-
child: MaterialButton(
216-
onPressed: () {
217-
FocusScope.of(context).unfocus();
218-
loginBloc.submitLogin();
219-
},
220-
color: Theme.of(context).backgroundColor,
221-
child: Text(
222-
'LOGIN',
223-
style: TextStyle(
224-
color: Colors.white,
225-
fontSize: 16.0,
226-
),
227-
),
228-
splashColor: Theme.of(context).accentColor,
229-
),
230215
builder: (context, child) {
231216
final value = buttonSqueezeAnimation.value;
232217

@@ -249,6 +234,21 @@ class _MyLoginPageState extends State<LoginPage>
249234
),
250235
);
251236
},
237+
child: MaterialButton(
238+
onPressed: () {
239+
FocusScope.of(context).unfocus();
240+
loginBloc.submitLogin();
241+
},
242+
color: Theme.of(context).backgroundColor,
243+
splashColor: Theme.of(context).accentColor,
244+
child: Text(
245+
'LOGIN',
246+
style: TextStyle(
247+
color: Colors.white,
248+
fontSize: 16.0,
249+
),
250+
),
251+
),
252252
);
253253
}
254254

lib/pages/register/register_page.dart

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -206,21 +206,6 @@ class _RegisterPageState extends State<RegisterPage>
206206
Widget registerButton(RegisterBloc registerBloc) {
207207
return AnimatedBuilder(
208208
animation: buttonSqueezeAnimation,
209-
child: MaterialButton(
210-
onPressed: () {
211-
FocusScope.of(context).unfocus();
212-
registerBloc.submitRegister();
213-
},
214-
color: Theme.of(context).backgroundColor,
215-
child: Text(
216-
'REGISTER',
217-
style: TextStyle(
218-
color: Colors.white,
219-
fontSize: 16.0,
220-
),
221-
),
222-
splashColor: Theme.of(context).accentColor,
223-
),
224209
builder: (context, child) {
225210
final value = buttonSqueezeAnimation.value;
226211

@@ -243,6 +228,21 @@ class _RegisterPageState extends State<RegisterPage>
243228
),
244229
);
245230
},
231+
child: MaterialButton(
232+
onPressed: () {
233+
FocusScope.of(context).unfocus();
234+
registerBloc.submitRegister();
235+
},
236+
color: Theme.of(context).backgroundColor,
237+
splashColor: Theme.of(context).accentColor,
238+
child: Text(
239+
'REGISTER',
240+
style: TextStyle(
241+
color: Colors.white,
242+
fontSize: 16.0,
243+
),
244+
),
245+
),
246246
);
247247
}
248248

lib/pages/reset_password/input_token/input_token_and_reset_password_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,18 +222,18 @@ class _InputTokenAndResetPasswordPageState
222222
Container(
223223
margin: const EdgeInsets.symmetric(horizontal: 16),
224224
child: ElevatedButton(
225-
child: Text('Submit'),
226225
style: buttonStyle,
227226
onPressed: resetPasswordBloc.submit,
227+
child: Text('Submit'),
228228
),
229229
),
230230
SizedBox(height: 8),
231231
Container(
232232
margin: const EdgeInsets.symmetric(horizontal: 16),
233233
child: ElevatedButton(
234-
child: Text('Request email'),
235234
style: buttonStyle,
236235
onPressed: widget.toggle,
236+
child: Text('Request email'),
237237
),
238238
),
239239
SizedBox(height: 24),

lib/pages/reset_password/reset_password_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ class _ResetPasswordPageState extends State<ResetPasswordPage>
127127
Positioned.fill(child: sendEmailPage),
128128
Positioned.fill(
129129
child: RotationTransition(
130+
turns: animationTurns,
130131
child: SlideTransition(
131132
position: animationPosition,
132133
child: ScaleTransition(
@@ -137,7 +138,6 @@ class _ResetPasswordPageState extends State<ResetPasswordPage>
137138
),
138139
),
139140
),
140-
turns: animationTurns,
141141
),
142142
)
143143
],

lib/pages/reset_password/send_email/send_email_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,18 +147,18 @@ class _SendEmailPageState extends State<SendEmailPage>
147147
Container(
148148
margin: const EdgeInsets.symmetric(horizontal: 16),
149149
child: ElevatedButton(
150-
child: Text('Send'),
151150
style: buttonStyle,
152151
onPressed: bloc.submit,
152+
child: Text('Send'),
153153
),
154154
),
155155
SizedBox(height: 8),
156156
Container(
157157
margin: const EdgeInsets.symmetric(horizontal: 16),
158158
child: ElevatedButton(
159-
child: Text('Input received token'),
160159
style: buttonStyle,
161160
onPressed: widget.toggle,
161+
child: Text('Input received token'),
162162
),
163163
),
164164
],

0 commit comments

Comments
 (0)