Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Revert "Use GradientButton in onboarding page"

AmanRajSinghMourya20b1b580d896
diff --git a/mobile/apps/locker/lib/ui/components/gradient_button.dart b/mobile/apps/locker/lib/ui/components/gradient_button.dart
index aeb98589b8..4579a26686 100644
--- a/mobile/apps/locker/lib/ui/components/gradient_button.dart
+++ b/mobile/apps/locker/lib/ui/components/gradient_button.dart
@@ -8,7 +8,6 @@ class GradientButton extends StatelessWidget {
final HugeIcon? hugeIcon;
final double paddingValue;
final Color? backgroundColor;
- final Color? textColor;
const GradientButton({
super.key,
@@ -17,7 +16,6 @@ class GradientButton extends StatelessWidget {
this.hugeIcon,
this.paddingValue = 6.0,
this.backgroundColor,
- this.textColor,
});
static const TextStyle _textStyle = TextStyle(
@@ -33,10 +31,8 @@ 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: effectiveTextColor,
+ color: isEnabled ? Colors.white : colorScheme.textMuted,
);
final Widget textWidget = Text(text, style: effectiveTextStyle);
diff --git a/mobile/apps/locker/lib/ui/pages/onboarding_page.dart b/mobile/apps/locker/lib/ui/pages/onboarding_page.dart
index 71d3a6f40d..12d1d5ad42 100644
--- a/mobile/apps/locker/lib/ui/pages/onboarding_page.dart
+++ b/mobile/apps/locker/lib/ui/pages/onboarding_page.dart
@@ -13,7 +13,6 @@ 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';
@@ -186,13 +185,29 @@ class _OnboardingPageState extends State<OnboardingPage> {
),
),
const SizedBox(height: 48),
- Padding(
+ Container(
+ width: double.infinity,
padding: const EdgeInsets.symmetric(horizontal: 24),
- child: GradientButton(
- text: l10n.loginToEnteAccount,
- backgroundColor: Colors.white,
- textColor: colorScheme.primary700,
- onTap: _navigateToSignInPage,
+ 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,
+ ),
+ ),
),
),
const SizedBox(height: 16),