Migrate SemanticsBinding to onSemanticsActionEvent (#128254)

Follow-up to https://github.com/flutter/engine/pull/42493.
This commit is contained in:
Michael Goderbauer
2023-06-05 11:16:06 -07:00
committed by GitHub
parent 130e84ecd2
commit 17f86df8bd
4 changed files with 20 additions and 56 deletions

View File

@@ -395,10 +395,10 @@ class TestPlatformDispatcher implements PlatformDispatcher {
}
@override
SemanticsActionCallback? get onSemanticsAction => _platformDispatcher.onSemanticsAction;
SemanticsActionEventCallback? get onSemanticsActionEvent => _platformDispatcher.onSemanticsActionEvent;
@override
set onSemanticsAction(SemanticsActionCallback? callback) {
_platformDispatcher.onSemanticsAction = callback;
set onSemanticsActionEvent(SemanticsActionEventCallback? callback) {
_platformDispatcher.onSemanticsActionEvent = callback;
}
@override
@@ -1880,23 +1880,6 @@ class TestWindow implements SingletonFlutterWindow {
platformDispatcher.onSemanticsEnabledChanged = callback;
}
@Deprecated(
'Use WidgetTester.platformDispatcher.onSemanticsAction instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override
SemanticsActionCallback? get onSemanticsAction => platformDispatcher.onSemanticsAction;
@Deprecated(
'Use WidgetTester.platformDispatcher.onSemanticsAction instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override
set onSemanticsAction(SemanticsActionCallback? callback) {
platformDispatcher.onSemanticsAction = callback;
}
@Deprecated(
'Use WidgetTester.platformDispatcher.accessibilityFeatures instead. '
'Deprecated to prepare for the upcoming multi-window support. '