mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
[material/menu_anchor.dart] Remove unused early key event listener (#150915)
Removes an unused block of code (I think -- I could be wrong but it does not appear to have any effect).
This commit is contained in:
parent
303cbb7cde
commit
d62069ff37
@ -544,14 +544,6 @@ _MenuAnchorState? get _previousFocusableSibling {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyEventResult _checkForEscape(KeyEvent event) {
|
|
||||||
if (event is KeyDownEvent && event.logicalKey == LogicalKeyboardKey.escape) {
|
|
||||||
_close();
|
|
||||||
return KeyEventResult.handled;
|
|
||||||
}
|
|
||||||
return KeyEventResult.ignored;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Open the menu, optionally at a position relative to the [MenuAnchor].
|
/// Open the menu, optionally at a position relative to the [MenuAnchor].
|
||||||
///
|
///
|
||||||
/// Call this when the menu should be shown to the user.
|
/// Call this when the menu should be shown to the user.
|
||||||
@ -592,9 +584,6 @@ _MenuAnchorState? get _previousFocusableSibling {
|
|||||||
if (!_isOpen) {
|
if (!_isOpen) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (_isRoot) {
|
|
||||||
FocusManager.instance.removeEarlyKeyEventHandler(_checkForEscape);
|
|
||||||
}
|
|
||||||
_closeChildren(inDispose: inDispose);
|
_closeChildren(inDispose: inDispose);
|
||||||
// Don't hide if we're in the middle of a build.
|
// Don't hide if we're in the middle of a build.
|
||||||
if (SchedulerBinding.instance.schedulerPhase != SchedulerPhase.persistentCallbacks) {
|
if (SchedulerBinding.instance.schedulerPhase != SchedulerPhase.persistentCallbacks) {
|
||||||
|
Loading…
Reference in New Issue
Block a user