diff --git a/packages/flutter_test/lib/src/window.dart b/packages/flutter_test/lib/src/window.dart index c01dca0391..e73accd6fe 100644 --- a/packages/flutter_test/lib/src/window.dart +++ b/packages/flutter_test/lib/src/window.dart @@ -1158,7 +1158,7 @@ class _UnsupportedDisplay implements TestDisplay { /// // Fake the desired properties of the TestWindow. All code running /// // within this test will perceive the following fake text scale /// // factor as the real text scale factor of the window. -/// testBinding.window.textScaleFactorTestValue = 2.5; // ignore: deprecated_member_use +/// testBinding.platformDispatcher.textScaleFactorTestValue = 2.5; /// /// // Test code that depends on text scale factor here. /// }); @@ -1533,24 +1533,6 @@ class TestWindow implements SingletonFlutterWindow { ) @override double get textScaleFactor => platformDispatcher.textScaleFactor; - /// Hides the real text scale factor and reports the given - /// [textScaleFactorTestValue] instead. - @Deprecated( - 'Use WidgetTester.platformDispatcher.textScaleFactorTestValue instead. ' - 'This feature was deprecated after v2.11.0-0.0.pre.' - ) - set textScaleFactorTestValue(double textScaleFactorTestValue) { // ignore: avoid_setters_without_getters - platformDispatcher.textScaleFactorTestValue = textScaleFactorTestValue; - } - /// Deletes any existing test text scale factor and returns to using the real - /// text scale factor. - @Deprecated( - 'Use WidgetTester.platformDispatcher.clearTextScaleFactorTestValue() instead. ' - 'This feature was deprecated after v2.11.0-0.0.pre.' - ) - void clearTextScaleFactorTestValue() { - platformDispatcher.clearTextScaleFactorTestValue(); - } @Deprecated( 'Use WidgetTester.platformDispatcher.platformBrightness instead. ' diff --git a/packages/flutter_test/test/window_test.dart b/packages/flutter_test/test/window_test.dart index 3bcafbbf7c..0483bea7e5 100644 --- a/packages/flutter_test/test/window_test.dart +++ b/packages/flutter_test/test/window_test.dart @@ -92,7 +92,7 @@ void main() { return WidgetsBinding.instance.window.textScaleFactor; }, propertyFaker: (TestWidgetsFlutterBinding binding, double fakeValue) { - binding.window.textScaleFactorTestValue = fakeValue; + binding.platformDispatcher.textScaleFactorTestValue = fakeValue; }, ); }); @@ -118,7 +118,7 @@ void main() { // Set fake values for window properties. testWindow.devicePixelRatioTestValue = 2.5; - testWindow.textScaleFactorTestValue = 3.0; + tester.platformDispatcher.textScaleFactorTestValue = 3.0; // Erase fake window property values. testWindow.clearAllTestValues();