Unverified Commit 0937207f authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Fix Platform channel errors in web tests (#70252)

parent 0c796599
......@@ -154,8 +154,8 @@ class TestWindow implements ui.SingletonFlutterWindow {
}
@override
// ignore: unnecessary_non_null_assertion
ui.Locale get locale => _localeTestValue ?? platformDispatcher.locale!;
// TODO(gspencergoog): remove the casts once https://github.com/flutter/engine/pull/22267 lands
ui.Locale get locale => _localeTestValue ?? ((platformDispatcher.locale as dynamic) as ui.Locale);
ui.Locale? _localeTestValue;
/// Hides the real locale and reports the given [localeTestValue] instead.
set localeTestValue(ui.Locale localeTestValue) {
......@@ -169,8 +169,8 @@ class TestWindow implements ui.SingletonFlutterWindow {
}
@override
// ignore: unnecessary_non_null_assertion
List<ui.Locale> get locales => _localesTestValue ?? platformDispatcher.locales!;
// TODO(gspencergoog): remove the casts once https://github.com/flutter/engine/pull/22267 lands
List<ui.Locale> get locales => _localesTestValue ?? ((platformDispatcher.locales as dynamic) as List<ui.Locale>);
List<ui.Locale>? _localesTestValue;
/// Hides the real locales and reports the given [localesTestValue] instead.
set localesTestValue(List<ui.Locale> localesTestValue) {
......
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