Unverified Commit 959cdb79 authored by Renzo Olivares's avatar Renzo Olivares Committed by GitHub

Remove deprecated...

Remove deprecated TestWindow.textScaleFactorTestValue/TestWindow.clearTextScaleFactorTestValue (#133176)

Part of: https://github.com/flutter/flutter/issues/133171
parent 8cbf42a7
...@@ -1158,7 +1158,7 @@ class _UnsupportedDisplay implements TestDisplay { ...@@ -1158,7 +1158,7 @@ class _UnsupportedDisplay implements TestDisplay {
/// // Fake the desired properties of the TestWindow. All code running /// // Fake the desired properties of the TestWindow. All code running
/// // within this test will perceive the following fake text scale /// // within this test will perceive the following fake text scale
/// // factor as the real text scale factor of the window. /// // 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. /// // Test code that depends on text scale factor here.
/// }); /// });
...@@ -1533,24 +1533,6 @@ class TestWindow implements SingletonFlutterWindow { ...@@ -1533,24 +1533,6 @@ class TestWindow implements SingletonFlutterWindow {
) )
@override @override
double get textScaleFactor => platformDispatcher.textScaleFactor; 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( @Deprecated(
'Use WidgetTester.platformDispatcher.platformBrightness instead. ' 'Use WidgetTester.platformDispatcher.platformBrightness instead. '
......
...@@ -92,7 +92,7 @@ void main() { ...@@ -92,7 +92,7 @@ void main() {
return WidgetsBinding.instance.window.textScaleFactor; return WidgetsBinding.instance.window.textScaleFactor;
}, },
propertyFaker: (TestWidgetsFlutterBinding binding, double fakeValue) { propertyFaker: (TestWidgetsFlutterBinding binding, double fakeValue) {
binding.window.textScaleFactorTestValue = fakeValue; binding.platformDispatcher.textScaleFactorTestValue = fakeValue;
}, },
); );
}); });
...@@ -118,7 +118,7 @@ void main() { ...@@ -118,7 +118,7 @@ void main() {
// Set fake values for window properties. // Set fake values for window properties.
testWindow.devicePixelRatioTestValue = 2.5; testWindow.devicePixelRatioTestValue = 2.5;
testWindow.textScaleFactorTestValue = 3.0; tester.platformDispatcher.textScaleFactorTestValue = 3.0;
// Erase fake window property values. // Erase fake window property values.
testWindow.clearAllTestValues(); testWindow.clearAllTestValues();
......
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