π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Use GradientButton consistently across onboarding
AmanRajSinghMourya0f03924f73a9
diff --git a/mobile/apps/locker/lib/ui/components/gradient_button.dart b/mobile/apps/locker/lib/ui/components/gradient_button.dartindex 4579a26686..aeb98589b8 100644--- a/mobile/apps/locker/lib/ui/components/gradient_button.dart+++ b/mobile/apps/locker/lib/ui/components/gradient_button.dart@@ -8,6 +8,7 @@ class GradientButton extends StatelessWidget {final HugeIcon? hugeIcon;final double paddingValue;final Color? backgroundColor;+ final Color? textColor;const GradientButton({super.key,@@ -16,6 +17,7 @@ class GradientButton extends StatelessWidget {this.hugeIcon,this.paddingValue = 6.0,this.backgroundColor,+ this.textColor,});static const TextStyle _textStyle = TextStyle(@@ -31,8 +33,10 @@ class GradientButton extends StatelessWidget {final bool isEnabled = onTap != null;final Color effectiveBackgroundColor = backgroundColor ??(isEnabled ? colorScheme.primary700 : colorScheme.fillFaint);+ final Color effectiveTextColor =+ textColor ?? (isEnabled ? Colors.white : colorScheme.textMuted);final TextStyle effectiveTextStyle = _textStyle.copyWith(- color: isEnabled ? Colors.white : colorScheme.textMuted,+ color: effectiveTextColor,);final Widget textWidget = Text(text, style: effectiveTextStyle);diff --git a/mobile/apps/locker/lib/ui/components/new_account_dialog.dart b/mobile/apps/locker/lib/ui/components/new_account_dialog.dartindex 485fcdf09c..59072b9b9f 100644--- a/mobile/apps/locker/lib/ui/components/new_account_dialog.dart+++ b/mobile/apps/locker/lib/ui/components/new_account_dialog.dart@@ -111,13 +111,7 @@ class _CreateNewAccountBottomSheet extends StatelessWidget {const SizedBox(height: 32),GradientButton(text: buttonLabel,- hugeIcon: icon ??- const HugeIcon(- icon: HugeIcons.strokeRoundedFileUpload,- color: Colors.white,- size: 20,- strokeWidth: 1.9,- ),+ hugeIcon: icon,onTap: () {Navigator.of(context).pop(ButtonResult(ButtonAction.first),diff --git a/mobile/apps/locker/lib/ui/pages/onboarding_page.dart b/mobile/apps/locker/lib/ui/pages/onboarding_page.dartindex 12d1d5ad42..71d3a6f40d 100644--- a/mobile/apps/locker/lib/ui/pages/onboarding_page.dart+++ b/mobile/apps/locker/lib/ui/pages/onboarding_page.dart@@ -13,6 +13,7 @@ import 'package:flutter/material.dart';import 'package:flutter/rendering.dart';import 'package:locker/l10n/l10n.dart';import 'package:locker/services/configuration.dart';+import "package:locker/ui/components/gradient_button.dart";import "package:locker/ui/components/new_account_dialog.dart";import 'package:locker/ui/pages/home_page.dart';@@ -185,29 +186,13 @@ class _OnboardingPageState extends State<OnboardingPage> {),),const SizedBox(height: 48),- Container(- width: double.infinity,+ Padding(padding: const EdgeInsets.symmetric(horizontal: 24),- child: ElevatedButton(- style: ElevatedButton.styleFrom(- backgroundColor: Colors.white,- foregroundColor: colorScheme.primary700,- padding: const EdgeInsets.symmetric(- horizontal: 8,- vertical: 18,- ),- shape: RoundedRectangleBorder(- borderRadius: BorderRadius.circular(20),- ),- minimumSize: const Size(double.infinity, 56),- ),- onPressed: _navigateToSignInPage,- child: Text(- l10n.loginToEnteAccount,- style: getEnteTextTheme(context).bodyBold.copyWith(- color: colorScheme.primary700,- ),- ),+ child: GradientButton(+ text: l10n.loginToEnteAccount,+ backgroundColor: Colors.white,+ textColor: colorScheme.primary700,+ onTap: _navigateToSignInPage,),),const SizedBox(height: 16),