diff --git a/lib/app.dart b/lib/app.dart index 4177930..1b04f94 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -60,13 +60,15 @@ class MyApp extends StatelessWidget { }, }; + final themeData = ThemeData(brightness: Brightness.dark); return Provider>.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, diff --git a/lib/pages/home/home_profile_widget.dart b/lib/pages/home/home_profile_widget.dart index 8642d5d..f2b9699 100644 --- a/lib/pages/home/home_profile_widget.dart +++ b/lib/pages/home/home_profile_widget.dart @@ -67,7 +67,7 @@ class HomeUserProfile extends StatelessWidget { children: [ Icon( Icons.error, - color: themeData.accentColor, + color: themeData.colorScheme.secondary, ), SizedBox(height: 4), Text( diff --git a/lib/pages/login/login_page.dart b/lib/pages/login/login_page.dart index f9c47e1..6977a72 100644 --- a/lib/pages/login/login_page.dart +++ b/lib/pages/login/login_page.dart @@ -221,7 +221,7 @@ class _MyLoginPageState extends State 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 @@ -240,7 +240,7 @@ class _MyLoginPageState extends State loginBloc.submitLogin(); }, color: Theme.of(context).backgroundColor, - splashColor: Theme.of(context).accentColor, + splashColor: Theme.of(context).colorScheme.secondary, child: Text( 'LOGIN', style: TextStyle( diff --git a/lib/pages/register/register_page.dart b/lib/pages/register/register_page.dart index b07a6b7..c5a1358 100644 --- a/lib/pages/register/register_page.dart +++ b/lib/pages/register/register_page.dart @@ -215,7 +215,7 @@ class _RegisterPageState extends State 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 @@ -234,7 +234,7 @@ class _RegisterPageState extends State registerBloc.submitRegister(); }, color: Theme.of(context).backgroundColor, - splashColor: Theme.of(context).accentColor, + splashColor: Theme.of(context).colorScheme.secondary, child: Text( 'REGISTER', style: TextStyle( diff --git a/lib/pages/reset_password/input_token/input_token_and_reset_password_page.dart b/lib/pages/reset_password/input_token/input_token_and_reset_password_page.dart index 37dd827..42543a5 100644 --- a/lib/pages/reset_password/input_token/input_token_and_reset_password_page.dart +++ b/lib/pages/reset_password/input_token/input_token_and_reset_password_page.dart @@ -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; }); diff --git a/lib/pages/reset_password/send_email/send_email_page.dart b/lib/pages/reset_password/send_email/send_email_page.dart index abd5e83..e37cc6c 100644 --- a/lib/pages/reset_password/send_email/send_email_page.dart +++ b/lib/pages/reset_password/send_email/send_email_page.dart @@ -94,11 +94,11 @@ class _SendEmailPageState extends State 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; });