Use SystemContextMenu by default on iOS (#165354)
With this change, widgets based on EditableText will show the system context menu by default on iOS. Anyone with a custom contextMenuBuilder will not be affected and will have to opt-in to using SystemContextMenu. Also, this does not affect SelectionArea, which can't receive paste. Fixes https://github.com/flutter/flutter/issues/163067
This commit is contained in:
committed by
GitHub
parent
f236af4975
commit
8128f08603
@@ -83,6 +83,21 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('TestPlatformDispatcher can fake supportsShowingSystemContextMenu', (
|
||||
WidgetTester tester,
|
||||
) async {
|
||||
verifyPropertyFaked<bool>(
|
||||
tester: tester,
|
||||
realValue: PlatformDispatcher.instance.supportsShowingSystemContextMenu,
|
||||
fakeValue: !PlatformDispatcher.instance.supportsShowingSystemContextMenu,
|
||||
propertyRetriever:
|
||||
() => WidgetsBinding.instance.platformDispatcher.supportsShowingSystemContextMenu,
|
||||
propertyFaker: (TestWidgetsFlutterBinding binding, bool fakeValue) {
|
||||
binding.platformDispatcher.supportsShowingSystemContextMenu = fakeValue;
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
testWidgets('TestPlatformDispatcher can fake brieflyShowPassword', (WidgetTester tester) async {
|
||||
verifyPropertyFaked<bool>(
|
||||
tester: tester,
|
||||
|
||||
Reference in New Issue
Block a user