Skip to content

armgit / ente

Public Imported from GitHub
0

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

padding for menu item widget

AmanRajSinghMouryaeb1e267a9446
diff --git a/mobile/apps/photos/lib/ui/components/menu_item_widget/menu_item_widget_new.dart b/mobile/apps/photos/lib/ui/components/menu_item_widget/menu_item_widget_new.dart
index 0fcaf54943..62a5e4f058 100644
--- a/mobile/apps/photos/lib/ui/components/menu_item_widget/menu_item_widget_new.dart
+++ b/mobile/apps/photos/lib/ui/components/menu_item_widget/menu_item_widget_new.dart
@@ -47,6 +47,10 @@ class MenuItemWidgetNew extends StatefulWidget {
/// Border radius for the menu item, defaults to 20
final double borderRadius;
+
+ /// Inner padding for the menu item.
+ final EdgeInsetsGeometry padding;
+
final Color? pressedColor;
/// disable gesture detector if not used
@@ -84,6 +88,7 @@ class MenuItemWidgetNew extends StatefulWidget {
this.onLongPress,
this.menuItemColor,
this.borderRadius = 20.0,
+ this.padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
this.pressedColor,
this.isGestureDetectorDisabled = false,
this.showOnlyLoadingState = false,
@@ -161,7 +166,7 @@ class _MenuItemWidgetNewState extends State<MenuItemWidgetNew> {
duration: const Duration(milliseconds: 20),
width: double.infinity,
clipBehavior: Clip.none,
- padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
+ padding: widget.padding,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(circularRadius),
color: effectiveMenuItemColor,