Native ios context menu (#143002)
It's now possible to use the native-rendered text selection context menu on iOS. This sacrifices customizability in exchange for avoiding showing a notification when the user presses "Paste". It's off by default, but to enable, see the example system_context_menu.0.dart.
This commit is contained in:
committed by
GitHub
parent
708fe97f9e
commit
125543505d
@@ -307,6 +307,18 @@ class TestPlatformDispatcher implements PlatformDispatcher {
|
||||
_nativeSpellCheckServiceDefinedTestValue = null;
|
||||
}
|
||||
|
||||
@override
|
||||
bool get supportsShowingSystemContextMenu => _supportsShowingSystemContextMenu ?? _platformDispatcher.supportsShowingSystemContextMenu;
|
||||
bool? _supportsShowingSystemContextMenu;
|
||||
set supportsShowingSystemContextMenu(bool value) { // ignore: avoid_setters_without_getters
|
||||
_supportsShowingSystemContextMenu = value;
|
||||
}
|
||||
|
||||
/// Resets [supportsShowingSystemContextMenu] to the default value.
|
||||
void resetSupportsShowingSystemContextMenu() {
|
||||
_supportsShowingSystemContextMenu = null;
|
||||
}
|
||||
|
||||
@override
|
||||
bool get brieflyShowPassword => _brieflyShowPasswordTestValue ?? _platformDispatcher.brieflyShowPassword;
|
||||
bool? _brieflyShowPasswordTestValue;
|
||||
@@ -458,6 +470,7 @@ class TestPlatformDispatcher implements PlatformDispatcher {
|
||||
clearTextScaleFactorTestValue();
|
||||
clearNativeSpellCheckServiceDefined();
|
||||
resetBrieflyShowPassword();
|
||||
resetSupportsShowingSystemContextMenu();
|
||||
resetInitialLifecycleState();
|
||||
resetSystemFontFamily();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user