From dabfb54ee861eadfe7c984ee7d199752d8f7a355 Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Tue, 30 Sep 2025 15:01:51 -0400 Subject: [PATCH] chore: re-style onboarding buttons (#4196) --- .../course_creation/course_invite_page.dart | 18 +++++--------- .../login/pages/language_selection_page.dart | 8 ++----- .../login/pages/login_options_view.dart | 11 ++++----- .../login/pages/login_or_signup_view.dart | 16 ++++--------- lib/pangea/login/pages/pangea_login_view.dart | 8 ++----- lib/pangea/login/pages/plan_trip_page.dart | 24 +++++-------------- lib/pangea/login/pages/private_trip_page.dart | 8 ++----- lib/pangea/login/pages/signup_view.dart | 11 ++++----- .../login/pages/signup_with_email_view.dart | 8 ++----- lib/pangea/login/widgets/p_sso_button.dart | 10 +++----- 10 files changed, 35 insertions(+), 87 deletions(-) diff --git a/lib/pangea/course_creation/course_invite_page.dart b/lib/pangea/course_creation/course_invite_page.dart index 452c385a5..034220751 100644 --- a/lib/pangea/course_creation/course_invite_page.dart +++ b/lib/pangea/course_creation/course_invite_page.dart @@ -177,12 +177,9 @@ class CourseInvitePageController extends State { } }, style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: + theme.colorScheme.onPrimaryContainer, ), child: Row( spacing: 8.0, @@ -204,12 +201,9 @@ class CourseInvitePageController extends State { } }, style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: + theme.colorScheme.onPrimaryContainer, ), child: Row( spacing: 8.0, diff --git a/lib/pangea/login/pages/language_selection_page.dart b/lib/pangea/login/pages/language_selection_page.dart index 7e080aa6d..64f66cbe0 100644 --- a/lib/pangea/login/pages/language_selection_page.dart +++ b/lib/pangea/login/pages/language_selection_page.dart @@ -127,12 +127,8 @@ class LanguageSelectionPageState extends State { } : null, style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: theme.colorScheme.onPrimaryContainer, ), child: Row( mainAxisAlignment: MainAxisAlignment.center, diff --git a/lib/pangea/login/pages/login_options_view.dart b/lib/pangea/login/pages/login_options_view.dart index eb538b2b2..d12f6b32f 100644 --- a/lib/pangea/login/pages/login_options_view.dart +++ b/lib/pangea/login/pages/login_options_view.dart @@ -50,12 +50,8 @@ class LoginOptionsView extends StatelessWidget { ElevatedButton( onPressed: () => context.go('/home/login/email'), style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: theme.colorScheme.onPrimaryContainer, ), child: Row( spacing: 8.0, @@ -63,7 +59,8 @@ class LoginOptionsView extends StatelessWidget { children: [ PangeaLogoSvg( width: 20, - forceColor: Theme.of(context).colorScheme.onSurface, + forceColor: + Theme.of(context).colorScheme.onPrimaryContainer, ), Text(L10n.of(context).email), ], diff --git a/lib/pangea/login/pages/login_or_signup_view.dart b/lib/pangea/login/pages/login_or_signup_view.dart index 161722b2f..f187984d9 100644 --- a/lib/pangea/login/pages/login_or_signup_view.dart +++ b/lib/pangea/login/pages/login_or_signup_view.dart @@ -95,12 +95,8 @@ class LoginOrSignupViewState extends State { ElevatedButton( onPressed: () => context.go('/home/signup'), style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: theme.colorScheme.onPrimaryContainer, ), child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -112,12 +108,8 @@ class LoginOrSignupViewState extends State { ElevatedButton( onPressed: () => context.go('/home/login'), style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: theme.colorScheme.onPrimaryContainer, ), child: Row( mainAxisAlignment: MainAxisAlignment.center, diff --git a/lib/pangea/login/pages/pangea_login_view.dart b/lib/pangea/login/pages/pangea_login_view.dart index 1bfb6b8bf..45c3bdfc3 100644 --- a/lib/pangea/login/pages/pangea_login_view.dart +++ b/lib/pangea/login/pages/pangea_login_view.dart @@ -108,12 +108,8 @@ class PasswordLoginView extends StatelessWidget { onPressed: controller.enabledSignIn ? controller.login : null, style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: theme.colorScheme.onPrimaryContainer, ), child: Row( mainAxisAlignment: MainAxisAlignment.center, diff --git a/lib/pangea/login/pages/plan_trip_page.dart b/lib/pangea/login/pages/plan_trip_page.dart index 4a1c028ec..c65fa287f 100644 --- a/lib/pangea/login/pages/plan_trip_page.dart +++ b/lib/pangea/login/pages/plan_trip_page.dart @@ -57,12 +57,8 @@ class PlanTripPage extends StatelessWidget { '/$route/course/private', ), style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: theme.colorScheme.onPrimaryContainer, ), child: Row( spacing: 4.0, @@ -78,12 +74,8 @@ class PlanTripPage extends StatelessWidget { '/$route/course/public', ), style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: theme.colorScheme.onPrimaryContainer, ), child: Row( spacing: 4.0, @@ -99,12 +91,8 @@ class PlanTripPage extends StatelessWidget { '/$route/course/own', ), style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: theme.colorScheme.onPrimaryContainer, ), child: Row( spacing: 4.0, diff --git a/lib/pangea/login/pages/private_trip_page.dart b/lib/pangea/login/pages/private_trip_page.dart index 8d6c3533c..470129e53 100644 --- a/lib/pangea/login/pages/private_trip_page.dart +++ b/lib/pangea/login/pages/private_trip_page.dart @@ -89,12 +89,8 @@ class PrivateTripPageState extends State { ElevatedButton( onPressed: _code.isNotEmpty ? _submit : null, style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: theme.colorScheme.onPrimaryContainer, ), child: Row( mainAxisAlignment: MainAxisAlignment.center, diff --git a/lib/pangea/login/pages/signup_view.dart b/lib/pangea/login/pages/signup_view.dart index f753755c8..4ec01ad9a 100644 --- a/lib/pangea/login/pages/signup_view.dart +++ b/lib/pangea/login/pages/signup_view.dart @@ -62,12 +62,8 @@ class SignupPageView extends StatelessWidget { '/home/signup/${controller.widget.langCode}/email', ), style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: theme.colorScheme.onPrimaryContainer, ), child: Row( spacing: 8.0, @@ -75,7 +71,8 @@ class SignupPageView extends StatelessWidget { children: [ PangeaLogoSvg( width: 20, - forceColor: Theme.of(context).colorScheme.onSurface, + forceColor: + Theme.of(context).colorScheme.onPrimaryContainer, ), Text(L10n.of(context).withEmail), ], diff --git a/lib/pangea/login/pages/signup_with_email_view.dart b/lib/pangea/login/pages/signup_with_email_view.dart index 9f05c0714..59da3b129 100644 --- a/lib/pangea/login/pages/signup_with_email_view.dart +++ b/lib/pangea/login/pages/signup_with_email_view.dart @@ -79,12 +79,8 @@ class SignupWithEmailView extends StatelessWidget { onPressed: controller.enableSignUp ? controller.signup : null, style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: theme.colorScheme.onPrimaryContainer, ), child: Row( mainAxisAlignment: MainAxisAlignment.center, diff --git a/lib/pangea/login/widgets/p_sso_button.dart b/lib/pangea/login/widgets/p_sso_button.dart index 97994375c..2b2125bee 100644 --- a/lib/pangea/login/widgets/p_sso_button.dart +++ b/lib/pangea/login/widgets/p_sso_button.dart @@ -83,12 +83,8 @@ class PangeaSsoButton extends StatelessWidget { final theme = Theme.of(context); return ElevatedButton( style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.surface, - foregroundColor: theme.colorScheme.onSurface, - side: BorderSide( - width: 1, - color: theme.colorScheme.onSurface, - ), + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: theme.colorScheme.onPrimaryContainer, ), child: Row( spacing: 8.0, @@ -99,7 +95,7 @@ class PangeaSsoButton extends StatelessWidget { height: 20, width: 20, colorFilter: ColorFilter.mode( - theme.colorScheme.onSurface, + theme.colorScheme.onPrimaryContainer, BlendMode.srcIn, ), ),