File tree 3 files changed +44
-0
lines changed 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -750,6 +750,27 @@ class PlatformDispatcher {
750
750
_invoke (onAccessibilityFeaturesChanged, _onAccessibilityFeaturesChangedZone,);
751
751
}
752
752
753
+ /// Change the retained semantics data about this platform dispatcher.
754
+ ///
755
+ /// If [semanticsEnabled] is true, the user has requested that this function
756
+ /// be called whenever the semantic content of this platform dispatcher
757
+ /// changes.
758
+ ///
759
+ /// In either case, this function disposes the given update, which means the
760
+ /// semantics update cannot be used further.
761
+ @Deprecated ('''
762
+ In a multi-view world, the platform dispatcher can no longer provide apis
763
+ to update semantics since each view will host its own semantics tree.
764
+
765
+ Semantics updates must be passed to an individual [FlutterView]. To update
766
+ semantics, use PlatformDispatcher.instance.views to get a [FlutterView] and
767
+ call `updateSemantics`.
768
+ ''' )
769
+ void updateSemantics (SemanticsUpdate update) => _updateSemantics (update);
770
+
771
+ @FfiNative < Void Function (Pointer <Void >)> ('PlatformConfigurationNativeApi::UpdateSemantics' )
772
+ external static void _updateSemantics (SemanticsUpdate update);
773
+
753
774
/// The system-reported default locale of the device.
754
775
///
755
776
/// This establishes the language and formatting conventions that application
Original file line number Diff line number Diff line change @@ -83,6 +83,14 @@ abstract class PlatformDispatcher {
83
83
VoidCallback ? get onAccessibilityFeaturesChanged;
84
84
set onAccessibilityFeaturesChanged (VoidCallback ? callback);
85
85
86
+ @Deprecated ('''
87
+ In a multi-view world, the platform dispatcher can no longer provide apis
88
+ to update semantics since each view will host its own semantics tree.
89
+
90
+ Semantics updates must be passed to an individual [FlutterView]. To update
91
+ semantics, use PlatformDispatcher.instance.views to get a [FlutterView] and
92
+ call `updateSemantics`.
93
+ ''' )
86
94
void updateSemantics (SemanticsUpdate update);
87
95
88
96
Locale get locale;
Original file line number Diff line number Diff line change @@ -690,7 +690,22 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
690
690
_onAccessibilityFeaturesChanged, _onAccessibilityFeaturesChangedZone);
691
691
}
692
692
693
+ /// Change the retained semantics data about this window.
694
+ ///
695
+ /// If [semanticsEnabled] is true, the user has requested that this function
696
+ /// be called whenever the semantic content of this window changes.
697
+ ///
698
+ /// In either case, this function disposes the given update, which means the
699
+ /// semantics update cannot be used further.
693
700
@override
701
+ @Deprecated ('''
702
+ In a multi-view world, the platform dispatcher can no longer provide apis
703
+ to update semantics since each view will host its own semantics tree.
704
+
705
+ Semantics updates must be passed to an individual [FlutterView]. To update
706
+ semantics, use PlatformDispatcher.instance.views to get a [FlutterView] and
707
+ call `updateSemantics`.
708
+ ''' )
694
709
void updateSemantics (ui.SemanticsUpdate update) {
695
710
EngineSemanticsOwner .instance.updateSemantics (update);
696
711
}
You can’t perform that action at this time.
0 commit comments