-
Notifications
You must be signed in to change notification settings - Fork 144
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Windows Use keyboard Enter-Key to repeat open and close (a little fast) DropdownItem will crash
with code. by set DropdownItem closeOnTap = false can shield this crash
void _handleOnTap() {
final DropdownItem<T> dropdownItem = widget.route.items[widget.itemIndex];
dropdownItem.onTap?.call();
widget.route.onChanged?.call(dropdownItem.value);
if (dropdownItem.closeOnTap) {
Navigator.pop(
context,
_DropdownRouteResult<T>(dropdownItem.value),
);
}
}here is the log
======== Exception caught by services library ======================================================
The following assertion was thrown while processing the key message handler:
You have popped the last page off of the stack, there are no pages left to show
'package:go_router/src/delegate.dart':
Failed assertion: line 175 pos 7: 'currentConfiguration.isNotEmpty'
When the exception was thrown, this was the stack:
#2 GoRouterDelegate._debugAssertMatchListNotEmpty (package:go_router/src/delegate.dart:175:7)
#3 GoRouterDelegate._completeRouteMatch (package:go_router/src/delegate.dart:196:5)
#4 GoRouterDelegate._handlePopPageWithRouteMatch (package:go_router/src/delegate.dart:154:7)
#5 _CustomNavigatorState._handlePopPage (package:go_router/src/builder.dart:440:42)
#6 NavigatorState.pop (package:flutter/src/widgets/navigator.dart:5580:28)
#7 Navigator.pop (package:flutter/src/widgets/navigator.dart:2774:27)
#8 _DropdownItemButtonState._handleOnTap (package:dropdown_button2/src/dropdown_menu_item.dart:219:17)
#9 _InkResponseState.activateOnIntent (package:flutter/src/material/ink_well.dart:873:21)
#10 CallbackAction.invoke (package:flutter/src/widgets/actions.dart:597:39)
#11 Action._invoke (package:flutter/src/widgets/actions.dart:335:10)
#12 ActionDispatcher.invokeActionIfEnabled (package:flutter/src/widgets/actions.dart:666:28)
#13 ShortcutManager.handleKeypress (package:flutter/src/widgets/shortcuts.dart:936:9)
#14 _ShortcutsState._handleOnKeyEvent (package:flutter/src/widgets/shortcuts.dart:1136:20)
#15 _HighlightModeManager.handleKeyMessage (package:flutter/src/widgets/focus_manager.dart:2246:72)
#16 KeyEventManager._dispatchKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1119:34)
#17 KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1194:17)
#18 BasicMessageChannel.setMessageHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:261:49)
#19 _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:653:35)
#20 _invoke2 (dart:ui/hooks.dart:363:13)
#21 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45:5)
#22 _Channel.push (dart:ui/channel_buffers.dart:136:31)
#23 ChannelBuffers.push (dart:ui/channel_buffers.dart:344:17)
#24 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:802:22)
#25 _dispatchPlatformMessage (dart:ui/hooks.dart:277:31)
(elided 2 frames from class _AssertionError)
KeyMessage: KeyMessage([KeyDownEvent#19daa(physicalKey: PhysicalKeyboardKey#e14a9(usbHidUsage: "0x00070028", debugName: "Enter"), logicalKey: LogicalKeyboardKey#2604c(keyId: "0x10000000d", keyLabel: "Enter", debugName: "Enter"), character: null, timeStamp: 100:02:33.940179)])
====================================================================================================
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested