Unverified Commit 4695fcc7 authored by pdblasi-google's avatar pdblasi-google Committed by GitHub

Deprecates `TestWindow` (#122824)

Deprecates `TestWindow`
parent 9136a474
...@@ -189,6 +189,32 @@ abstract class TestWidgetsFlutterBinding extends BindingBase ...@@ -189,6 +189,32 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
debugDisableShadows = disableShadows; debugDisableShadows = disableShadows;
} }
/// Deprecated. Will be removed in a future version of Flutter.
///
/// This property has been deprecated to prepare for Flutter's upcoming
/// support for multiple views and multiple windows.
///
/// This represents a combination of a [TestPlatformDispatcher] and a singular
/// [TestFlutterView]. Platform-specific test values can be set through
/// [WidgetTester.platformDispatcher] instead. When testing individual widgets
/// or applications using [WidgetTester.pumpWidget], view-specific test values
/// can be set through [WidgetTester.view]. If multiple views are defined, the
/// appropriate view can be found using [WidgetTester.viewOf] if a sub-view
/// is needed.
///
/// See also:
///
/// * [WidgetTester.platformDispatcher] for changing platform-specific values
/// for testing.
/// * [WidgetTester.view] and [WidgetTester.viewOf] for changing view-specific
/// values for testing.
/// * [BindingBase.window] for guidance dealing with this property outside of
/// a testing context.
@Deprecated(
'Use WidgetTester.platformDispatcher or WidgetTester.view instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
late final TestWindow window; late final TestWindow window;
......
...@@ -949,6 +949,11 @@ class TestFlutterView implements FlutterView { ...@@ -949,6 +949,11 @@ class TestFlutterView implements FlutterView {
} }
} }
/// Deprecated. Will be removed in a future version of Flutter.
///
/// This class has been deprecated to prepare for Flutter's upcoming support
/// for multiple views and multiple windows.
///
/// [SingletonFlutterWindow] that wraps another [SingletonFlutterWindow] and /// [SingletonFlutterWindow] that wraps another [SingletonFlutterWindow] and
/// allows faking of some properties for testing purposes. /// allows faking of some properties for testing purposes.
/// ///
...@@ -984,19 +989,29 @@ class TestFlutterView implements FlutterView { ...@@ -984,19 +989,29 @@ class TestFlutterView implements FlutterView {
/// If a test needs to override a real [SingletonFlutterWindow] property and /// If a test needs to override a real [SingletonFlutterWindow] property and
/// then later return to using the real [SingletonFlutterWindow] property, /// then later return to using the real [SingletonFlutterWindow] property,
/// [TestWindow] provides methods to clear each individual test value, e.g., /// [TestWindow] provides methods to clear each individual test value, e.g.,
/// [clearLocaleTestValue()]. /// [clearLocaleTestValue].
/// ///
/// To clear all fake test values in a [TestWindow], consider using /// To clear all fake test values in a [TestWindow], consider using
/// [clearAllTestValues()]. /// [clearAllTestValues].
/// ///
/// See also: /// See also:
/// ///
/// * [TestPlatformDispatcher], which wraps a [PlatformDispatcher] for /// * [TestPlatformDispatcher], which wraps a [PlatformDispatcher] for
/// testing purposes and is used by the [platformDispatcher] property of /// testing purposes and is used by the [platformDispatcher] property of
/// this class. /// this class.
@Deprecated(
'Use TestPlatformDispatcher (via WidgetTester.platformDispatcher) or TestFlutterView (via WidgetTester.view) instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
class TestWindow implements SingletonFlutterWindow { class TestWindow implements SingletonFlutterWindow {
/// Constructs a [TestWindow] that defers all behavior to the given /// Constructs a [TestWindow] that defers all behavior to the given
/// [SingletonFlutterWindow] unless explicitly overridden for test purposes. /// [SingletonFlutterWindow] unless explicitly overridden for test purposes.
@Deprecated(
'Use TestPlatformDispatcher (via WidgetTester.platformDispatcher) or TestFlutterView (via WidgetTester.view) instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
TestWindow({ TestWindow({
required SingletonFlutterWindow window, required SingletonFlutterWindow window,
}) : platformDispatcher = TestPlatformDispatcher(platformDispatcher: window.platformDispatcher); }) : platformDispatcher = TestPlatformDispatcher(platformDispatcher: window.platformDispatcher);
...@@ -1014,154 +1029,297 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1014,154 +1029,297 @@ class TestWindow implements SingletonFlutterWindow {
/// testing purposes. /// testing purposes.
/// * [TestFlutterView] which allows faking of view-specific values for /// * [TestFlutterView] which allows faking of view-specific values for
/// testing purposes. /// testing purposes.
@Deprecated(
'Use TestPlatformDispatcher (via WidgetTester.platformDispatcher) or TestFlutterView (via WidgetTester.view) instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
TestWindow.fromPlatformDispatcher({ TestWindow.fromPlatformDispatcher({
@Deprecated(
'Use WidgetTester.platformDispatcher instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
required this.platformDispatcher, required this.platformDispatcher,
}); });
@Deprecated(
'Use WidgetTester.platformDispatcher instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
final TestPlatformDispatcher platformDispatcher; final TestPlatformDispatcher platformDispatcher;
TestFlutterView get _view => platformDispatcher.implicitView!; TestFlutterView get _view => platformDispatcher.implicitView!;
@Deprecated(
'Use WidgetTester.view.devicePixelRatio instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
double get devicePixelRatio => _view.devicePixelRatio; double get devicePixelRatio => _view.devicePixelRatio;
/// Hides the real device pixel ratio and reports the given [devicePixelRatio] /// Hides the real device pixel ratio and reports the given [devicePixelRatio]
/// instead. /// instead.
// ignore: avoid_setters_without_getters @Deprecated(
set devicePixelRatioTestValue(double devicePixelRatio) { 'Use WidgetTester.view.devicePixelRatio instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
set devicePixelRatioTestValue(double devicePixelRatio) { // ignore: avoid_setters_without_getters
_view.devicePixelRatio = devicePixelRatio; _view.devicePixelRatio = devicePixelRatio;
} }
/// Deletes any existing test device pixel ratio and returns to using the real /// Deletes any existing test device pixel ratio and returns to using the real
/// device pixel ratio. /// device pixel ratio.
@Deprecated(
'Use WidgetTester.view.resetDevicePixelRatio() instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
void clearDevicePixelRatioTestValue() { void clearDevicePixelRatioTestValue() {
_view.resetDevicePixelRatio(); _view.resetDevicePixelRatio();
} }
@Deprecated(
'Use WidgetTester.view.physicalSize instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
Size get physicalSize => _view.physicalSize; Size get physicalSize => _view.physicalSize;
/// Hides the real physical size and reports the given [physicalSizeTestValue] /// Hides the real physical size and reports the given [physicalSizeTestValue]
/// instead. /// instead.
// ignore: avoid_setters_without_getters @Deprecated(
set physicalSizeTestValue (Size physicalSizeTestValue) { 'Use WidgetTester.view.physicalSize instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
set physicalSizeTestValue (Size physicalSizeTestValue) { // ignore: avoid_setters_without_getters
_view.physicalSize = physicalSizeTestValue; _view.physicalSize = physicalSizeTestValue;
} }
/// Deletes any existing test physical size and returns to using the real /// Deletes any existing test physical size and returns to using the real
/// physical size. /// physical size.
@Deprecated(
'Use WidgetTester.view.resetPhysicalSize() instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
void clearPhysicalSizeTestValue() { void clearPhysicalSizeTestValue() {
_view.resetPhysicalSize(); _view.resetPhysicalSize();
} }
@Deprecated(
'Use WidgetTester.view.viewInsets instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
ViewPadding get viewInsets => _view.viewInsets; ViewPadding get viewInsets => _view.viewInsets;
/// Hides the real view insets and reports the given [viewInsetsTestValue] /// Hides the real view insets and reports the given [viewInsetsTestValue]
/// instead. /// instead.
/// ///
/// Use [FakeViewPadding] to set this value for testing. /// Use [FakeViewPadding] to set this value for testing.
// ignore: avoid_setters_without_getters @Deprecated(
set viewInsetsTestValue(ViewPadding value) { 'Use WidgetTester.view.viewInsets instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
set viewInsetsTestValue(ViewPadding value) { // ignore: avoid_setters_without_getters
_view.viewInsets = value is FakeViewPadding ? value : FakeViewPadding._wrap(value); _view.viewInsets = value is FakeViewPadding ? value : FakeViewPadding._wrap(value);
} }
/// Deletes any existing test view insets and returns to using the real view /// Deletes any existing test view insets and returns to using the real view
/// insets. /// insets.
@Deprecated(
'Use WidgetTester.view.resetViewInsets() instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
void clearViewInsetsTestValue() { void clearViewInsetsTestValue() {
_view.resetViewInsets(); _view.resetViewInsets();
} }
@Deprecated(
'Use WidgetTester.view.viewPadding instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
ViewPadding get viewPadding => _view.viewPadding; ViewPadding get viewPadding => _view.viewPadding;
/// Hides the real view padding and reports the given [paddingTestValue] /// Hides the real view padding and reports the given [paddingTestValue]
/// instead. /// instead.
/// ///
/// Use [FakeViewPadding] to set this value for testing. /// Use [FakeViewPadding] to set this value for testing.
// ignore: avoid_setters_without_getters @Deprecated(
set viewPaddingTestValue(ViewPadding value) { 'Use WidgetTester.view.viewPadding instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
set viewPaddingTestValue(ViewPadding value) { // ignore: avoid_setters_without_getters
_view.viewPadding = value is FakeViewPadding ? value : FakeViewPadding._wrap(value); _view.viewPadding = value is FakeViewPadding ? value : FakeViewPadding._wrap(value);
} }
/// Deletes any existing test view padding and returns to using the real /// Deletes any existing test view padding and returns to using the real
/// viewPadding. /// viewPadding.
@Deprecated(
'Use WidgetTester.view.resetViewPadding() instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
void clearViewPaddingTestValue() { void clearViewPaddingTestValue() {
_view.resetViewPadding(); _view.resetViewPadding();
} }
@Deprecated(
'Use WidgetTester.view.padding instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
ViewPadding get padding => _view.padding; ViewPadding get padding => _view.padding;
/// Hides the real padding and reports the given [paddingTestValue] instead. /// Hides the real padding and reports the given [paddingTestValue] instead.
/// ///
/// Use [FakeViewPadding] to set this value for testing. /// Use [FakeViewPadding] to set this value for testing.
// ignore: avoid_setters_without_getters @Deprecated(
set paddingTestValue(ViewPadding value) { 'Use WidgetTester.view.padding instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
set paddingTestValue(ViewPadding value) { // ignore: avoid_setters_without_getters
_view.padding = value is FakeViewPadding ? value : FakeViewPadding._wrap(value); _view.padding = value is FakeViewPadding ? value : FakeViewPadding._wrap(value);
} }
/// Deletes any existing test padding and returns to using the real padding. /// Deletes any existing test padding and returns to using the real padding.
@Deprecated(
'Use WidgetTester.view.resetPadding() instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
void clearPaddingTestValue() { void clearPaddingTestValue() {
_view.resetPadding(); _view.resetPadding();
} }
@Deprecated(
'Use WidgetTester.view.gestureSettings instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
GestureSettings get gestureSettings => _view.gestureSettings; GestureSettings get gestureSettings => _view.gestureSettings;
/// Hides the real gesture settings and reports the given [gestureSettingsTestValue] instead. /// Hides the real gesture settings and reports the given [gestureSettingsTestValue] instead.
// ignore: avoid_setters_without_getters @Deprecated(
set gestureSettingsTestValue(GestureSettings gestureSettingsTestValue) { 'Use WidgetTester.view.gestureSettings instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
set gestureSettingsTestValue(GestureSettings gestureSettingsTestValue) { // ignore: avoid_setters_without_getters
_view.gestureSettings = gestureSettingsTestValue; _view.gestureSettings = gestureSettingsTestValue;
} }
/// Deletes any existing test gesture settings and returns to using the real gesture settings. /// Deletes any existing test gesture settings and returns to using the real gesture settings.
@Deprecated(
'Use WidgetTester.view.resetGestureSettings() instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
void clearGestureSettingsTestValue() { void clearGestureSettingsTestValue() {
_view.resetGestureSettings(); _view.resetGestureSettings();
} }
@Deprecated(
'Use WidgetTester.view.displayFeatures instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
List<DisplayFeature> get displayFeatures => _view.displayFeatures; List<DisplayFeature> get displayFeatures => _view.displayFeatures;
/// Hides the real displayFeatures and reports the given [displayFeaturesTestValue] instead. /// Hides the real displayFeatures and reports the given [displayFeaturesTestValue] instead.
// ignore: avoid_setters_without_getters @Deprecated(
set displayFeaturesTestValue(List<DisplayFeature> displayFeaturesTestValue) { 'Use WidgetTester.view.displayFeatures instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
set displayFeaturesTestValue(List<DisplayFeature> displayFeaturesTestValue) { // ignore: avoid_setters_without_getters
_view.displayFeatures = displayFeaturesTestValue; _view.displayFeatures = displayFeaturesTestValue;
} }
/// Deletes any existing test padding and returns to using the real padding. /// Deletes any existing test padding and returns to using the real padding.
@Deprecated(
'Use WidgetTester.view.resetDisplayFeatures() instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
void clearDisplayFeaturesTestValue() { void clearDisplayFeaturesTestValue() {
_view.resetDisplayFeatures(); _view.resetDisplayFeatures();
} }
@Deprecated(
'Use WidgetTester.view.systemGestureInsets instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
ViewPadding get systemGestureInsets => _view.systemGestureInsets; ViewPadding get systemGestureInsets => _view.systemGestureInsets;
/// Hides the real system gesture insets and reports the given /// Hides the real system gesture insets and reports the given
/// [systemGestureInsetsTestValue] instead. /// [systemGestureInsetsTestValue] instead.
/// ///
/// Use [FakeViewPadding] to set this value for testing. /// Use [FakeViewPadding] to set this value for testing.
@Deprecated(
'Use WidgetTester.view.systemGestureInsets instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
set systemGestureInsetsTestValue(ViewPadding value) { // ignore: avoid_setters_without_getters set systemGestureInsetsTestValue(ViewPadding value) { // ignore: avoid_setters_without_getters
_view.systemGestureInsets = value is FakeViewPadding ? value : FakeViewPadding._wrap(value); _view.systemGestureInsets = value is FakeViewPadding ? value : FakeViewPadding._wrap(value);
} }
/// Deletes any existing test system gesture insets and returns to using the real system gesture insets. /// Deletes any existing test system gesture insets and returns to using the real system gesture insets.
@Deprecated(
'Use WidgetTester.view.resetSystemGestureInsets() instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
void clearSystemGestureInsetsTestValue() { void clearSystemGestureInsetsTestValue() {
_view.resetSystemGestureInsets(); _view.resetSystemGestureInsets();
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.onMetricsChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
VoidCallback? get onMetricsChanged => platformDispatcher.onMetricsChanged; VoidCallback? get onMetricsChanged => platformDispatcher.onMetricsChanged;
@Deprecated(
'Use WidgetTester.platformDispatcher.onMetricsChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onMetricsChanged(VoidCallback? callback) { set onMetricsChanged(VoidCallback? callback) {
platformDispatcher.onMetricsChanged = callback; platformDispatcher.onMetricsChanged = callback;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.locale instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
Locale get locale => platformDispatcher.locale; Locale get locale => platformDispatcher.locale;
/// Hides the real locale and reports the given [localeTestValue] instead. /// Hides the real locale and reports the given [localeTestValue] instead.
@Deprecated( @Deprecated(
'Use platformDispatcher.localeTestValue instead. ' 'Use WidgetTester.platformDispatcher.localeTestValue instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
set localeTestValue(Locale localeTestValue) { // ignore: avoid_setters_without_getters set localeTestValue(Locale localeTestValue) { // ignore: avoid_setters_without_getters
platformDispatcher.localeTestValue = localeTestValue; platformDispatcher.localeTestValue = localeTestValue;
} }
@Deprecated( @Deprecated(
'Use platformDispatcher.clearLocaleTestValue() instead. ' 'Use WidgetTester.platformDispatcher.clearLocaleTestValue() instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
/// Deletes any existing test locale and returns to using the real locale. /// Deletes any existing test locale and returns to using the real locale.
...@@ -1169,11 +1327,16 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1169,11 +1327,16 @@ class TestWindow implements SingletonFlutterWindow {
platformDispatcher.clearLocaleTestValue(); platformDispatcher.clearLocaleTestValue();
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.locales instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
List<Locale> get locales => platformDispatcher.locales; List<Locale> get locales => platformDispatcher.locales;
/// Hides the real locales and reports the given [localesTestValue] instead. /// Hides the real locales and reports the given [localesTestValue] instead.
@Deprecated( @Deprecated(
'Use platformDispatcher.localesTestValue instead. ' 'Use WidgetTester.platformDispatcher.localesTestValue instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
set localesTestValue(List<Locale> localesTestValue) { // ignore: avoid_setters_without_getters set localesTestValue(List<Locale> localesTestValue) { // ignore: avoid_setters_without_getters
...@@ -1181,37 +1344,57 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1181,37 +1344,57 @@ class TestWindow implements SingletonFlutterWindow {
} }
/// Deletes any existing test locales and returns to using the real locales. /// Deletes any existing test locales and returns to using the real locales.
@Deprecated( @Deprecated(
'Use platformDispatcher.clearLocalesTestValue() instead. ' 'Use WidgetTester.platformDispatcher.clearLocalesTestValue() instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
void clearLocalesTestValue() { void clearLocalesTestValue() {
platformDispatcher.clearLocalesTestValue(); platformDispatcher.clearLocalesTestValue();
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.onLocaleChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
VoidCallback? get onLocaleChanged => platformDispatcher.onLocaleChanged; VoidCallback? get onLocaleChanged => platformDispatcher.onLocaleChanged;
@Deprecated(
'Use WidgetTester.platformDispatcher.onLocaleChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onLocaleChanged(VoidCallback? callback) { set onLocaleChanged(VoidCallback? callback) {
platformDispatcher.onLocaleChanged = callback; platformDispatcher.onLocaleChanged = callback;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.initialLifecycleState instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
String get initialLifecycleState => platformDispatcher.initialLifecycleState; String get initialLifecycleState => platformDispatcher.initialLifecycleState;
/// Sets a faked initialLifecycleState for testing. /// Sets a faked initialLifecycleState for testing.
@Deprecated( @Deprecated(
'Use platformDispatcher.initialLifecycleStateTestValue instead. ' 'Use WidgetTester.platformDispatcher.initialLifecycleStateTestValue instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
set initialLifecycleStateTestValue(String state) { // ignore: avoid_setters_without_getters set initialLifecycleStateTestValue(String state) { // ignore: avoid_setters_without_getters
platformDispatcher.initialLifecycleStateTestValue = state; platformDispatcher.initialLifecycleStateTestValue = state;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.textScaleFactor instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
double get textScaleFactor => platformDispatcher.textScaleFactor; double get textScaleFactor => platformDispatcher.textScaleFactor;
/// Hides the real text scale factor and reports the given /// Hides the real text scale factor and reports the given
/// [textScaleFactorTestValue] instead. /// [textScaleFactorTestValue] instead.
@Deprecated( @Deprecated(
'Use platformDispatcher.textScaleFactorTestValue instead. ' 'Use WidgetTester.platformDispatcher.textScaleFactorTestValue instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
set textScaleFactorTestValue(double textScaleFactorTestValue) { // ignore: avoid_setters_without_getters set textScaleFactorTestValue(double textScaleFactorTestValue) { // ignore: avoid_setters_without_getters
...@@ -1220,17 +1403,32 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1220,17 +1403,32 @@ class TestWindow implements SingletonFlutterWindow {
/// Deletes any existing test text scale factor and returns to using the real /// Deletes any existing test text scale factor and returns to using the real
/// text scale factor. /// text scale factor.
@Deprecated( @Deprecated(
'Use platformDispatcher.clearTextScaleFactorTestValue() instead. ' 'Use WidgetTester.platformDispatcher.clearTextScaleFactorTestValue() instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
void clearTextScaleFactorTestValue() { void clearTextScaleFactorTestValue() {
platformDispatcher.clearTextScaleFactorTestValue(); platformDispatcher.clearTextScaleFactorTestValue();
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.platformBrightness instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
Brightness get platformBrightness => platformDispatcher.platformBrightness; Brightness get platformBrightness => platformDispatcher.platformBrightness;
@Deprecated(
'Use WidgetTester.platformDispatcher.onPlatformBrightnessChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
VoidCallback? get onPlatformBrightnessChanged => platformDispatcher.onPlatformBrightnessChanged; VoidCallback? get onPlatformBrightnessChanged => platformDispatcher.onPlatformBrightnessChanged;
@Deprecated(
'Use WidgetTester.platformDispatcher.onPlatformBrightnessChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onPlatformBrightnessChanged(VoidCallback? callback) { set onPlatformBrightnessChanged(VoidCallback? callback) {
platformDispatcher.onPlatformBrightnessChanged = callback; platformDispatcher.onPlatformBrightnessChanged = callback;
...@@ -1238,7 +1436,7 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1238,7 +1436,7 @@ class TestWindow implements SingletonFlutterWindow {
/// Hides the real text scale factor and reports the given /// Hides the real text scale factor and reports the given
/// [platformBrightnessTestValue] instead. /// [platformBrightnessTestValue] instead.
@Deprecated( @Deprecated(
'Use platformDispatcher.platformBrightnessTestValue instead. ' 'Use WidgetTester.platformDispatcher.platformBrightnessTestValue instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
set platformBrightnessTestValue(Brightness platformBrightnessTestValue) { // ignore: avoid_setters_without_getters set platformBrightnessTestValue(Brightness platformBrightnessTestValue) { // ignore: avoid_setters_without_getters
...@@ -1247,19 +1445,24 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1247,19 +1445,24 @@ class TestWindow implements SingletonFlutterWindow {
/// Deletes any existing test platform brightness and returns to using the /// Deletes any existing test platform brightness and returns to using the
/// real platform brightness. /// real platform brightness.
@Deprecated( @Deprecated(
'Use platformDispatcher.clearPlatformBrightnessTestValue() instead. ' 'Use WidgetTester.platformDispatcher.clearPlatformBrightnessTestValue() instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
void clearPlatformBrightnessTestValue() { void clearPlatformBrightnessTestValue() {
platformDispatcher.clearPlatformBrightnessTestValue(); platformDispatcher.clearPlatformBrightnessTestValue();
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.alwaysUse24HourFormat instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
bool get alwaysUse24HourFormat => platformDispatcher.alwaysUse24HourFormat; bool get alwaysUse24HourFormat => platformDispatcher.alwaysUse24HourFormat;
/// Hides the real clock format and reports the given /// Hides the real clock format and reports the given
/// [alwaysUse24HourFormatTestValue] instead. /// [alwaysUse24HourFormatTestValue] instead.
@Deprecated( @Deprecated(
'Use platformDispatcher.alwaysUse24HourFormatTestValue instead. ' 'Use WidgetTester.platformDispatcher.alwaysUse24HourFormatTestValue instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
set alwaysUse24HourFormatTestValue(bool alwaysUse24HourFormatTestValue) { // ignore: avoid_setters_without_getters set alwaysUse24HourFormatTestValue(bool alwaysUse24HourFormatTestValue) { // ignore: avoid_setters_without_getters
...@@ -1268,72 +1471,142 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1268,72 +1471,142 @@ class TestWindow implements SingletonFlutterWindow {
/// Deletes any existing test clock format and returns to using the real clock /// Deletes any existing test clock format and returns to using the real clock
/// format. /// format.
@Deprecated( @Deprecated(
'Use platformDispatcher.clearAlwaysUse24HourTestValue() instead. ' 'Use WidgetTester.platformDispatcher.clearAlwaysUse24HourTestValue() instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
void clearAlwaysUse24HourTestValue() { void clearAlwaysUse24HourTestValue() {
platformDispatcher.clearAlwaysUse24HourTestValue(); platformDispatcher.clearAlwaysUse24HourTestValue();
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.onTextScaleFactorChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
VoidCallback? get onTextScaleFactorChanged => platformDispatcher.onTextScaleFactorChanged; VoidCallback? get onTextScaleFactorChanged => platformDispatcher.onTextScaleFactorChanged;
@Deprecated(
'Use WidgetTester.platformDispatcher.onTextScaleFactorChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onTextScaleFactorChanged(VoidCallback? callback) { set onTextScaleFactorChanged(VoidCallback? callback) {
platformDispatcher.onTextScaleFactorChanged = callback; platformDispatcher.onTextScaleFactorChanged = callback;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.nativeSpellCheckServiceDefined instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
bool get nativeSpellCheckServiceDefined => platformDispatcher.nativeSpellCheckServiceDefined; bool get nativeSpellCheckServiceDefined => platformDispatcher.nativeSpellCheckServiceDefined;
@Deprecated(
'Use WidgetTester.platformDispatcher.nativeSpellCheckServiceDefinedTestValue instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
set nativeSpellCheckServiceDefinedTestValue(bool nativeSpellCheckServiceDefinedTestValue) { // ignore: avoid_setters_without_getters set nativeSpellCheckServiceDefinedTestValue(bool nativeSpellCheckServiceDefinedTestValue) { // ignore: avoid_setters_without_getters
platformDispatcher.nativeSpellCheckServiceDefinedTestValue = nativeSpellCheckServiceDefinedTestValue; platformDispatcher.nativeSpellCheckServiceDefinedTestValue = nativeSpellCheckServiceDefinedTestValue;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.brieflyShowPassword instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
bool get brieflyShowPassword => platformDispatcher.brieflyShowPassword; bool get brieflyShowPassword => platformDispatcher.brieflyShowPassword;
/// Hides the real [brieflyShowPassword] and reports the given /// Hides the real [brieflyShowPassword] and reports the given
/// `brieflyShowPasswordTestValue` instead. /// `brieflyShowPasswordTestValue` instead.
@Deprecated( @Deprecated(
'Use platformDispatcher.brieflyShowPasswordTestValue instead. ' 'Use WidgetTester.platformDispatcher.brieflyShowPasswordTestValue instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
set brieflyShowPasswordTestValue(bool brieflyShowPasswordTestValue) { // ignore: avoid_setters_without_getters set brieflyShowPasswordTestValue(bool brieflyShowPasswordTestValue) { // ignore: avoid_setters_without_getters
platformDispatcher.brieflyShowPasswordTestValue = brieflyShowPasswordTestValue; platformDispatcher.brieflyShowPasswordTestValue = brieflyShowPasswordTestValue;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.onBeginFrame instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
FrameCallback? get onBeginFrame => platformDispatcher.onBeginFrame; FrameCallback? get onBeginFrame => platformDispatcher.onBeginFrame;
@Deprecated(
'Use WidgetTester.platformDispatcher.onBeginFrame instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onBeginFrame(FrameCallback? callback) { set onBeginFrame(FrameCallback? callback) {
platformDispatcher.onBeginFrame = callback; platformDispatcher.onBeginFrame = callback;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.onDrawFrame instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
VoidCallback? get onDrawFrame => platformDispatcher.onDrawFrame; VoidCallback? get onDrawFrame => platformDispatcher.onDrawFrame;
@Deprecated(
'Use WidgetTester.platformDispatcher.onDrawFrame instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onDrawFrame(VoidCallback? callback) { set onDrawFrame(VoidCallback? callback) {
platformDispatcher.onDrawFrame = callback; platformDispatcher.onDrawFrame = callback;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.onReportTimings instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
TimingsCallback? get onReportTimings => platformDispatcher.onReportTimings; TimingsCallback? get onReportTimings => platformDispatcher.onReportTimings;
@Deprecated(
'Use WidgetTester.platformDispatcher.onReportTimings instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onReportTimings(TimingsCallback? callback) { set onReportTimings(TimingsCallback? callback) {
platformDispatcher.onReportTimings = callback; platformDispatcher.onReportTimings = callback;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.onPointerDataPacket instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
PointerDataPacketCallback? get onPointerDataPacket => platformDispatcher.onPointerDataPacket; PointerDataPacketCallback? get onPointerDataPacket => platformDispatcher.onPointerDataPacket;
@Deprecated(
'Use WidgetTester.platformDispatcher.onPointerDataPacket instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onPointerDataPacket(PointerDataPacketCallback? callback) { set onPointerDataPacket(PointerDataPacketCallback? callback) {
platformDispatcher.onPointerDataPacket = callback; platformDispatcher.onPointerDataPacket = callback;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.defaultRouteName instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
String get defaultRouteName => platformDispatcher.defaultRouteName; String get defaultRouteName => platformDispatcher.defaultRouteName;
/// Hides the real default route name and reports the given /// Hides the real default route name and reports the given
/// [defaultRouteNameTestValue] instead. /// [defaultRouteNameTestValue] instead.
@Deprecated( @Deprecated(
'Use platformDispatcher.defaultRouteNameTestValue instead. ' 'Use WidgetTester.platformDispatcher.defaultRouteNameTestValue instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
set defaultRouteNameTestValue(String defaultRouteNameTestValue) { // ignore: avoid_setters_without_getters set defaultRouteNameTestValue(String defaultRouteNameTestValue) { // ignore: avoid_setters_without_getters
...@@ -1342,29 +1615,44 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1342,29 +1615,44 @@ class TestWindow implements SingletonFlutterWindow {
/// Deletes any existing test default route name and returns to using the real /// Deletes any existing test default route name and returns to using the real
/// default route name. /// default route name.
@Deprecated( @Deprecated(
'Use platformDispatcher.clearDefaultRouteNameTestValue instead. ' 'Use WidgetTester.platformDispatcher.clearDefaultRouteNameTestValue() instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
void clearDefaultRouteNameTestValue() { void clearDefaultRouteNameTestValue() {
platformDispatcher.clearDefaultRouteNameTestValue(); platformDispatcher.clearDefaultRouteNameTestValue();
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.scheduleFrame() instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
void scheduleFrame() { void scheduleFrame() {
platformDispatcher.scheduleFrame(); platformDispatcher.scheduleFrame();
} }
@Deprecated(
'Use WidgetTester.view.render(scene) instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
void render(Scene scene) { void render(Scene scene) {
_view.render(scene); _view.render(scene);
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.semanticsEnabled instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
bool get semanticsEnabled => platformDispatcher.semanticsEnabled; bool get semanticsEnabled => platformDispatcher.semanticsEnabled;
/// Hides the real semantics enabled and reports the given /// Hides the real semantics enabled and reports the given
/// [semanticsEnabledTestValue] instead. /// [semanticsEnabledTestValue] instead.
@Deprecated( @Deprecated(
'Use platformDispatcher.semanticsEnabledTestValue instead. ' 'Use WidgetTester.platformDispatcher.semanticsEnabledTestValue instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
set semanticsEnabledTestValue(bool semanticsEnabledTestValue) { // ignore: avoid_setters_without_getters set semanticsEnabledTestValue(bool semanticsEnabledTestValue) { // ignore: avoid_setters_without_getters
...@@ -1373,27 +1661,52 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1373,27 +1661,52 @@ class TestWindow implements SingletonFlutterWindow {
/// Deletes any existing test semantics enabled and returns to using the real /// Deletes any existing test semantics enabled and returns to using the real
/// semantics enabled. /// semantics enabled.
@Deprecated( @Deprecated(
'Use platformDispatcher.clearSemanticsEnabledTestValue instead. ' 'Use WidgetTester.platformDispatcher.clearSemanticsEnabledTestValue() instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
void clearSemanticsEnabledTestValue() { void clearSemanticsEnabledTestValue() {
platformDispatcher.clearSemanticsEnabledTestValue(); platformDispatcher.clearSemanticsEnabledTestValue();
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.onSemanticsEnabledChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
VoidCallback? get onSemanticsEnabledChanged => platformDispatcher.onSemanticsEnabledChanged; VoidCallback? get onSemanticsEnabledChanged => platformDispatcher.onSemanticsEnabledChanged;
@Deprecated(
'Use WidgetTester.platformDispatcher.onSemanticsEnabledChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onSemanticsEnabledChanged(VoidCallback? callback) { set onSemanticsEnabledChanged(VoidCallback? callback) {
platformDispatcher.onSemanticsEnabledChanged = callback; 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 @override
SemanticsActionCallback? get onSemanticsAction => platformDispatcher.onSemanticsAction; 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 @override
set onSemanticsAction(SemanticsActionCallback? callback) { set onSemanticsAction(SemanticsActionCallback? callback) {
platformDispatcher.onSemanticsAction = callback; platformDispatcher.onSemanticsAction = callback;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.accessibilityFeatures instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
AccessibilityFeatures get accessibilityFeatures => platformDispatcher.accessibilityFeatures; AccessibilityFeatures get accessibilityFeatures => platformDispatcher.accessibilityFeatures;
/// Hides the real accessibility features and reports the given /// Hides the real accessibility features and reports the given
...@@ -1402,7 +1715,7 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1402,7 +1715,7 @@ class TestWindow implements SingletonFlutterWindow {
/// Consider using [FakeAccessibilityFeatures] to provide specific /// Consider using [FakeAccessibilityFeatures] to provide specific
/// values for the various accessibility features under test. /// values for the various accessibility features under test.
@Deprecated( @Deprecated(
'Use platformDispatcher.accessibilityFeaturesTestValue instead. ' 'Use WidgetTester.platformDispatcher.accessibilityFeaturesTestValue instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
set accessibilityFeaturesTestValue(AccessibilityFeatures accessibilityFeaturesTestValue) { // ignore: avoid_setters_without_getters set accessibilityFeaturesTestValue(AccessibilityFeatures accessibilityFeaturesTestValue) { // ignore: avoid_setters_without_getters
...@@ -1411,30 +1724,55 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1411,30 +1724,55 @@ class TestWindow implements SingletonFlutterWindow {
/// Deletes any existing test accessibility features and returns to using the /// Deletes any existing test accessibility features and returns to using the
/// real accessibility features. /// real accessibility features.
@Deprecated( @Deprecated(
'Use platformDispatcher.clearAccessibilityFeaturesTestValue() instead. ' 'Use WidgetTester.platformDispatcher.clearAccessibilityFeaturesTestValue() instead. '
'This feature was deprecated after v2.11.0-0.0.pre.' 'This feature was deprecated after v2.11.0-0.0.pre.'
) )
void clearAccessibilityFeaturesTestValue() { void clearAccessibilityFeaturesTestValue() {
platformDispatcher.clearAccessibilityFeaturesTestValue(); platformDispatcher.clearAccessibilityFeaturesTestValue();
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.onAccessibilityFeaturesChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
VoidCallback? get onAccessibilityFeaturesChanged => platformDispatcher.onAccessibilityFeaturesChanged; VoidCallback? get onAccessibilityFeaturesChanged => platformDispatcher.onAccessibilityFeaturesChanged;
@Deprecated(
'Use WidgetTester.platformDispatcher.onAccessibilityFeaturesChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onAccessibilityFeaturesChanged(VoidCallback? callback) { set onAccessibilityFeaturesChanged(VoidCallback? callback) {
platformDispatcher.onAccessibilityFeaturesChanged = callback; platformDispatcher.onAccessibilityFeaturesChanged = callback;
} }
@Deprecated(
'Use WidgetTester.view.updateSemantics(update) instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
void updateSemantics(SemanticsUpdate update) { void updateSemantics(SemanticsUpdate update) {
_view.updateSemantics(update); _view.updateSemantics(update);
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.setIsolateDebugName(name) instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
void setIsolateDebugName(String name) { void setIsolateDebugName(String name) {
platformDispatcher.setIsolateDebugName(name); platformDispatcher.setIsolateDebugName(name);
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.sendPlatformMessage(name, data, callback) instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
void sendPlatformMessage( void sendPlatformMessage(
String name, String name,
...@@ -1467,6 +1805,11 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1467,6 +1805,11 @@ class TestWindow implements SingletonFlutterWindow {
/// ///
/// If desired, clearing of properties can be done on an individual basis, /// If desired, clearing of properties can be done on an individual basis,
/// e.g., [clearLocaleTestValue]. /// e.g., [clearLocaleTestValue].
@Deprecated(
'Use WidgetTester.platformDispatcher.clearAllTestValues() and WidgetTester.view.reset() instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
void clearAllTestValues() { void clearAllTestValues() {
clearDevicePixelRatioTestValue(); clearDevicePixelRatioTestValue();
clearPaddingTestValue(); clearPaddingTestValue();
...@@ -1478,40 +1821,95 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1478,40 +1821,95 @@ class TestWindow implements SingletonFlutterWindow {
} }
@override @override
@Deprecated(
'Use WidgetTester.platformDispatcher.onFrameDataChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
VoidCallback? get onFrameDataChanged => platformDispatcher.onFrameDataChanged; VoidCallback? get onFrameDataChanged => platformDispatcher.onFrameDataChanged;
@Deprecated(
'Use WidgetTester.platformDispatcher.onFrameDataChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onFrameDataChanged(VoidCallback? value) { set onFrameDataChanged(VoidCallback? value) {
platformDispatcher.onFrameDataChanged = value; platformDispatcher.onFrameDataChanged = value;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.onKeyData instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
KeyDataCallback? get onKeyData => platformDispatcher.onKeyData; KeyDataCallback? get onKeyData => platformDispatcher.onKeyData;
@Deprecated(
'Use WidgetTester.platformDispatcher.onKeyData instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onKeyData(KeyDataCallback? value) { set onKeyData(KeyDataCallback? value) {
platformDispatcher.onKeyData = value; platformDispatcher.onKeyData = value;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.onSystemFontFamilyChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
VoidCallback? get onSystemFontFamilyChanged => platformDispatcher.onSystemFontFamilyChanged; VoidCallback? get onSystemFontFamilyChanged => platformDispatcher.onSystemFontFamilyChanged;
@Deprecated(
'Use WidgetTester.platformDispatcher.onSystemFontFamilyChanged instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
set onSystemFontFamilyChanged(VoidCallback? value) { set onSystemFontFamilyChanged(VoidCallback? value) {
platformDispatcher.onSystemFontFamilyChanged = value; platformDispatcher.onSystemFontFamilyChanged = value;
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.computePlatformResolvedLocale(supportedLocales) instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
Locale? computePlatformResolvedLocale(List<Locale> supportedLocales) { Locale? computePlatformResolvedLocale(List<Locale> supportedLocales) {
return platformDispatcher.computePlatformResolvedLocale(supportedLocales); return platformDispatcher.computePlatformResolvedLocale(supportedLocales);
} }
@Deprecated(
'Use WidgetTester.platformDispatcher.frameData instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
FrameData get frameData => platformDispatcher.frameData; FrameData get frameData => platformDispatcher.frameData;
@Deprecated(
'Use WidgetTester.platformDispatcher.physicalGeometry instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
Rect get physicalGeometry => _view.physicalGeometry; Rect get physicalGeometry => _view.physicalGeometry;
@Deprecated(
'Use WidgetTester.platformDispatcher.systemFontFamily instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
String? get systemFontFamily => platformDispatcher.systemFontFamily; String? get systemFontFamily => platformDispatcher.systemFontFamily;
@Deprecated(
'Use WidgetTester.view.viewId instead. '
'Deprecated to prepare for the upcoming multi-window support. '
'This feature was deprecated after v3.9.0-0.1.pre.'
)
@override @override
Object get viewId => _view.viewId; Object get viewId => _view.viewId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment