浏览代码

remove onPressed state on tap cancel for storage card

ashilkn 2 年之前
父节点
当前提交
e96f6d7ac6
共有 1 个文件被更改,包括 3 次插入6 次删除
  1. 3 6
      lib/ui/settings/details_section_widget.dart

+ 3 - 6
lib/ui/settings/details_section_widget.dart

@@ -64,12 +64,9 @@ class _DetailsSectionWidgetState extends State<DetailsSectionWidget> {
             ),
             ),
           );
           );
         },
         },
-        onTapDown: (details) {
-          _isStorageCardPressed.value = true;
-        },
-        onTapUp: (details) {
-          _isStorageCardPressed.value = false;
-        },
+        onTapDown: (details) => _isStorageCardPressed.value = true,
+        onTapCancel: () => _isStorageCardPressed.value = false,
+        onTapUp: (details) => _isStorageCardPressed.value = false,
         child: containerForUserDetails(inheritedUserDetails),
         child: containerForUserDetails(inheritedUserDetails),
       );
       );
     }
     }