Переглянути джерело

added onCancel on menuItem for bug fix

ashilkn 2 роки тому
батько
коміт
e750d4b804
1 змінених файлів з 7 додано та 0 видалено
  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;
+    });
+  }
 }