Skip to content

armgit / ente

Public Imported from GitHub
0

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

Refactor GradientButton to use ClipRRect

AmanRajSinghMourya193e1374e18a
diff --git a/mobile/packages/ui/lib/components/buttons/gradient_button.dart b/mobile/packages/ui/lib/components/buttons/gradient_button.dart
index b98c7894ef..f5b6d9eeb9 100644
--- a/mobile/packages/ui/lib/components/buttons/gradient_button.dart
+++ b/mobile/packages/ui/lib/components/buttons/gradient_button.dart
@@ -59,22 +59,24 @@ class GradientButton extends StatelessWidget {
}
return InkWell(
onTap: onTap as void Function()?,
- child: Container(
- height: 56,
- decoration: BoxDecoration(
- gradient: LinearGradient(
- begin: const Alignment(0.1, -0.9),
- end: const Alignment(-0.6, 0.9),
- colors: onTap != null
- ? getEnteColorScheme(context).gradientButtonBgColors
- : [
- getEnteColorScheme(context).fillMuted,
- getEnteColorScheme(context).fillMuted,
- ],
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(4),
+ child: Container(
+ height: 56,
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: const Alignment(0.1, -0.9),
+ end: const Alignment(-0.6, 0.9),
+ colors: onTap != null
+ ? getEnteColorScheme(context).gradientButtonBgColors
+ : [
+ getEnteColorScheme(context).fillMuted,
+ getEnteColorScheme(context).fillMuted,
+ ],
+ ),
),
- borderRadius: BorderRadius.circular(24),
+ child: Center(child: buttonContent),
),
- child: Center(child: buttonContent),
),
);
}