Explorar el Código

added onCancel on menuItem for bug fix

ashilkn hace 2 años
padre
commit
e750d4b804
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. 7 0
      lib/ui/components/menu_item_widget.dart

+ 7 - 0
lib/ui/components/menu_item_widget.dart

@@ -71,6 +71,7 @@ class _MenuItemWidgetState extends State<MenuItemWidget> {
             onDoubleTap: widget.onDoubleTap,
             onTapDown: _onTapDown,
             onTapUp: _onTapUp,
+            onTapCancel: _onCancel,
             child: menuItemWidget(context),
           );
   }
@@ -160,4 +161,10 @@ class _MenuItemWidgetState extends State<MenuItemWidget> {
       }),
     );
   }
+
+  void _onCancel() {
+    setState(() {
+      menuItemColor = widget.menuItemColor;
+    });
+  }
 }