|
@@ -129,6 +129,12 @@ class _MenuItemWidgetState extends State<MenuItemWidget> {
|
|
super.didChangeDependencies();
|
|
super.didChangeDependencies();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @override
|
|
|
|
+ void didUpdateWidget(covariant MenuItemWidget oldWidget) {
|
|
|
|
+ menuItemColor = widget.menuItemColor;
|
|
|
|
+ super.didUpdateWidget(oldWidget);
|
|
|
|
+ }
|
|
|
|
+
|
|
@override
|
|
@override
|
|
void dispose() {
|
|
void dispose() {
|
|
if (widget.expandableController != null) {
|
|
if (widget.expandableController != null) {
|
|
@@ -210,6 +216,8 @@ class _MenuItemWidgetState extends State<MenuItemWidget> {
|
|
}
|
|
}
|
|
|
|
|
|
Future<void> _onTap() async {
|
|
Future<void> _onTap() async {
|
|
|
|
+ if (executionStateNotifier.value == ExecutionState.inProgress ||
|
|
|
|
+ executionStateNotifier.value == ExecutionState.successful) return;
|
|
_debouncer.run(
|
|
_debouncer.run(
|
|
() => Future(
|
|
() => Future(
|
|
() {
|
|
() {
|
|
@@ -245,6 +253,8 @@ class _MenuItemWidgetState extends State<MenuItemWidget> {
|
|
}
|
|
}
|
|
|
|
|
|
void _onTapDown(details) {
|
|
void _onTapDown(details) {
|
|
|
|
+ if (executionStateNotifier.value == ExecutionState.inProgress ||
|
|
|
|
+ executionStateNotifier.value == ExecutionState.successful) return;
|
|
setState(() {
|
|
setState(() {
|
|
if (widget.pressedColor == null) {
|
|
if (widget.pressedColor == null) {
|
|
hasPassedGestureCallbacks()
|
|
hasPassedGestureCallbacks()
|
|
@@ -261,6 +271,8 @@ class _MenuItemWidgetState extends State<MenuItemWidget> {
|
|
}
|
|
}
|
|
|
|
|
|
void _onTapUp(details) {
|
|
void _onTapUp(details) {
|
|
|
|
+ if (executionStateNotifier.value == ExecutionState.inProgress ||
|
|
|
|
+ executionStateNotifier.value == ExecutionState.successful) return;
|
|
Future.delayed(
|
|
Future.delayed(
|
|
const Duration(milliseconds: 100),
|
|
const Duration(milliseconds: 100),
|
|
() => setState(() {
|
|
() => setState(() {
|
|
@@ -270,6 +282,8 @@ class _MenuItemWidgetState extends State<MenuItemWidget> {
|
|
}
|
|
}
|
|
|
|
|
|
void _onCancel() {
|
|
void _onCancel() {
|
|
|
|
+ if (executionStateNotifier.value == ExecutionState.inProgress ||
|
|
|
|
+ executionStateNotifier.value == ExecutionState.successful) return;
|
|
setState(() {
|
|
setState(() {
|
|
menuItemColor = widget.menuItemColor;
|
|
menuItemColor = widget.menuItemColor;
|
|
});
|
|
});
|