Jelajahi Sumber

Gradient button disable state

Neeraj Gupta 2 tahun lalu
induk
melakukan
f4c7fc0f88
1 mengubah file dengan 7 tambahan dan 1 penghapusan
  1. 7 1
      lib/ui/common/gradient_button.dart

+ 7 - 1
lib/ui/common/gradient_button.dart

@@ -1,6 +1,7 @@
 // @dart=2.9
 
 import 'package:flutter/material.dart';
+import 'package:photos/theme/ente_theme.dart';
 
 class GradientButton extends StatelessWidget {
   final List<Color> linearGradientColors;
@@ -71,7 +72,12 @@ class GradientButton extends StatelessWidget {
           gradient: LinearGradient(
             begin: const Alignment(0.1, -0.9),
             end: const Alignment(-0.6, 0.9),
-            colors: linearGradientColors,
+            colors: onTap != null
+                ? linearGradientColors
+                : [
+                    getEnteColorScheme(context).fillMuted,
+                    getEnteColorScheme(context).fillMuted
+                  ],
           ),
           borderRadius: BorderRadius.circular(8),
         ),