|
@@ -21,6 +21,8 @@ class MenuItemWidget extends StatefulWidget {
|
|
final ExpandableController? expandableController;
|
|
final ExpandableController? expandableController;
|
|
final bool isBottomBorderRadiusRemoved;
|
|
final bool isBottomBorderRadiusRemoved;
|
|
final bool isTopBorderRadiusRemoved;
|
|
final bool isTopBorderRadiusRemoved;
|
|
|
|
+ //disable gesture detector if not used
|
|
|
|
+ final bool isGestureDetectorDisabled;
|
|
const MenuItemWidget({
|
|
const MenuItemWidget({
|
|
required this.captionedTextWidget,
|
|
required this.captionedTextWidget,
|
|
this.isExpandable = false,
|
|
this.isExpandable = false,
|
|
@@ -38,6 +40,7 @@ class MenuItemWidget extends StatefulWidget {
|
|
this.expandableController,
|
|
this.expandableController,
|
|
this.isBottomBorderRadiusRemoved = false,
|
|
this.isBottomBorderRadiusRemoved = false,
|
|
this.isTopBorderRadiusRemoved = false,
|
|
this.isTopBorderRadiusRemoved = false,
|
|
|
|
+ this.isGestureDetectorDisabled = false,
|
|
Key? key,
|
|
Key? key,
|
|
}) : super(key: key);
|
|
}) : super(key: key);
|
|
|
|
|
|
@@ -74,7 +77,7 @@ class _MenuItemWidgetState extends State<MenuItemWidget> {
|
|
|
|
|
|
@override
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
- return widget.isExpandable
|
|
|
|
|
|
+ return widget.isExpandable || widget.isGestureDetectorDisabled
|
|
? menuItemWidget(context)
|
|
? menuItemWidget(context)
|
|
: GestureDetector(
|
|
: GestureDetector(
|
|
onTap: widget.onTap,
|
|
onTap: widget.onTap,
|