Browse Source

use different expandableTheme for bottomActionBar's expansionPanel

ashilkn 2 years ago
parent
commit
716d6c395a
1 changed files with 12 additions and 2 deletions
  1. 12 2
      lib/ui/components/bottom_action_bar/bottom_action_bar_widget.dart

+ 12 - 2
lib/ui/components/bottom_action_bar/bottom_action_bar_widget.dart

@@ -7,7 +7,6 @@ import 'package:photos/theme/effects.dart';
 import 'package:photos/theme/ente_theme.dart';
 import 'package:photos/theme/ente_theme.dart';
 import 'package:photos/ui/components/bottom_action_bar/action_bar_widget.dart';
 import 'package:photos/ui/components/bottom_action_bar/action_bar_widget.dart';
 import 'package:photos/ui/components/icon_button_widget.dart';
 import 'package:photos/ui/components/icon_button_widget.dart';
-import 'package:photos/ui/settings/common_settings.dart';
 
 
 class BottomActionBarWidget extends StatelessWidget {
 class BottomActionBarWidget extends StatelessWidget {
   final String? text;
   final String? text;
@@ -52,7 +51,7 @@ class BottomActionBarWidget extends StatelessWidget {
               ExpandableNotifier(
               ExpandableNotifier(
                 controller: _expandableController,
                 controller: _expandableController,
                 child: ExpandablePanel(
                 child: ExpandablePanel(
-                  theme: getExpandableTheme(context),
+                  theme: _getExpandableTheme(),
                   header: Padding(
                   header: Padding(
                     padding: EdgeInsets.symmetric(
                     padding: EdgeInsets.symmetric(
                       horizontal: text == null ? 12 : 0,
                       horizontal: text == null ? 12 : 0,
@@ -105,6 +104,17 @@ class BottomActionBarWidget extends StatelessWidget {
     iconButtonsWithExpansionIcon.removeWhere((element) => element == null);
     iconButtonsWithExpansionIcon.removeWhere((element) => element == null);
     return iconButtonsWithExpansionIcon as List<Widget>;
     return iconButtonsWithExpansionIcon as List<Widget>;
   }
   }
+
+  ExpandableThemeData _getExpandableTheme() {
+    return const ExpandableThemeData(
+      hasIcon: false,
+      useInkWell: false,
+      tapBodyToCollapse: false,
+      tapBodyToExpand: false,
+      tapHeaderToExpand: false,
+      animationDuration: Duration(milliseconds: 400),
+    );
+  }
 }
 }
 
 
 class ExpansionIconWidget extends StatefulWidget {
 class ExpansionIconWidget extends StatefulWidget {