Remove deprecated TestWindow.platformBrightnessTestValue/TestWindow.clearPlatformBrightnessTestValue (#133178)
Part of: https://github.com/flutter/flutter/issues/133171
This commit is contained in:
parent
a66eae17a2
commit
b1f691c9fc
@ -1557,24 +1557,6 @@ class TestWindow implements SingletonFlutterWindow {
|
|||||||
set onPlatformBrightnessChanged(VoidCallback? callback) {
|
set onPlatformBrightnessChanged(VoidCallback? callback) {
|
||||||
platformDispatcher.onPlatformBrightnessChanged = callback;
|
platformDispatcher.onPlatformBrightnessChanged = callback;
|
||||||
}
|
}
|
||||||
/// Hides the real text scale factor and reports the given
|
|
||||||
/// [platformBrightnessTestValue] instead.
|
|
||||||
@Deprecated(
|
|
||||||
'Use WidgetTester.platformDispatcher.platformBrightnessTestValue instead. '
|
|
||||||
'This feature was deprecated after v2.11.0-0.0.pre.'
|
|
||||||
)
|
|
||||||
set platformBrightnessTestValue(Brightness platformBrightnessTestValue) { // ignore: avoid_setters_without_getters
|
|
||||||
platformDispatcher.platformBrightnessTestValue = platformBrightnessTestValue;
|
|
||||||
}
|
|
||||||
/// Deletes any existing test platform brightness and returns to using the
|
|
||||||
/// real platform brightness.
|
|
||||||
@Deprecated(
|
|
||||||
'Use WidgetTester.platformDispatcher.clearPlatformBrightnessTestValue() instead. '
|
|
||||||
'This feature was deprecated after v2.11.0-0.0.pre.'
|
|
||||||
)
|
|
||||||
void clearPlatformBrightnessTestValue() {
|
|
||||||
platformDispatcher.clearPlatformBrightnessTestValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated(
|
@Deprecated(
|
||||||
'Use WidgetTester.platformDispatcher.alwaysUse24HourFormat instead. '
|
'Use WidgetTester.platformDispatcher.alwaysUse24HourFormat instead. '
|
||||||
|
@ -106,7 +106,7 @@ void main() {
|
|||||||
return WidgetsBinding.instance.window.platformBrightness;
|
return WidgetsBinding.instance.window.platformBrightness;
|
||||||
},
|
},
|
||||||
propertyFaker: (TestWidgetsFlutterBinding binding, Brightness fakeValue) {
|
propertyFaker: (TestWidgetsFlutterBinding binding, Brightness fakeValue) {
|
||||||
binding.window.platformBrightnessTestValue = fakeValue;
|
binding.platformDispatcher.platformBrightnessTestValue = fakeValue;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user