Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
hoc081098 committed Aug 8, 2021
1 parent 585409a commit 1d8a77a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
8 changes: 5 additions & 3 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ class MyApp extends StatelessWidget {
},
};

final themeData = ThemeData(brightness: Brightness.dark);
return Provider<Map<String, WidgetBuilder>>.value(
routes,
child: MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
brightness: Brightness.dark,
accentColor: const Color(0xFF00e676),
theme: themeData.copyWith(
colorScheme: themeData.colorScheme.copyWith(
secondary: const Color(0xFF00e676),
),
),
routes: routes,
debugShowCheckedModeBanner: false,
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/home/home_profile_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class HomeUserProfile extends StatelessWidget {
children: <Widget>[
Icon(
Icons.error,
color: themeData.accentColor,
color: themeData.colorScheme.secondary,
),
SizedBox(height: 4),
Text(
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/login/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class _MyLoginPageState extends State<LoginPage>
child: Material(
elevation: 5.0,
clipBehavior: Clip.antiAlias,
shadowColor: Theme.of(context).accentColor,
shadowColor: Theme.of(context).colorScheme.secondary,
borderRadius: BorderRadius.circular(24.0),
child: value > 75.0
? child
Expand All @@ -240,7 +240,7 @@ class _MyLoginPageState extends State<LoginPage>
loginBloc.submitLogin();
},
color: Theme.of(context).backgroundColor,
splashColor: Theme.of(context).accentColor,
splashColor: Theme.of(context).colorScheme.secondary,
child: Text(
'LOGIN',
style: TextStyle(
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/register/register_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class _RegisterPageState extends State<RegisterPage>
child: Material(
elevation: 5.0,
clipBehavior: Clip.antiAlias,
shadowColor: Theme.of(context).accentColor,
shadowColor: Theme.of(context).colorScheme.secondary,
borderRadius: BorderRadius.circular(24.0),
child: value > 75.0
? child
Expand All @@ -234,7 +234,7 @@ class _RegisterPageState extends State<RegisterPage>
registerBloc.submitRegister();
},
color: Theme.of(context).backgroundColor,
splashColor: Theme.of(context).accentColor,
splashColor: Theme.of(context).colorScheme.secondary,
child: Text(
'REGISTER',
style: TextStyle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ class _InputTokenAndResetPasswordPageState

final overlayColor = MaterialStateProperty.resolveWith((states) {
if (states.contains(MaterialState.hovered)) {
return Theme.of(context).accentColor.withOpacity(0.5);
return Theme.of(context).colorScheme.secondary.withOpacity(0.5);
}
if (states.contains(MaterialState.focused) ||
states.contains(MaterialState.pressed)) {
return Theme.of(context).accentColor.withOpacity(0.8);
return Theme.of(context).colorScheme.secondary.withOpacity(0.8);
}
return null;
});
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/reset_password/send_email/send_email_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ class _SendEmailPageState extends State<SendEmailPage>

final overlayColor = MaterialStateProperty.resolveWith((states) {
if (states.contains(MaterialState.hovered)) {
return Theme.of(context).accentColor.withOpacity(0.5);
return Theme.of(context).colorScheme.secondary.withOpacity(0.5);
}
if (states.contains(MaterialState.focused) ||
states.contains(MaterialState.pressed)) {
return Theme.of(context).accentColor.withOpacity(0.8);
return Theme.of(context).colorScheme.secondary.withOpacity(0.8);
}
return null;
});
Expand Down

0 comments on commit 1d8a77a

Please sign in to comment.