We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b233f0 commit 9434bb6Copy full SHA for 9434bb6
lib/ui/hooks.dart
@@ -42,7 +42,12 @@ void _updateWindowMetrics(double devicePixelRatio,
42
43
typedef _LocaleClosure = String Function();
44
45
-String _localeClosure() => window.locale.toString();
+String _localeClosure() {
46
+ if (window.locale == null) {
47
+ return null;
48
+ }
49
+ return window.locale.toString();
50
+}
51
52
@pragma('vm:entry-point')
53
_LocaleClosure _getLocaleClosure() => _localeClosure;
0 commit comments