Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 29e77ba

Browse files
committed
Review Changes
1 parent 6d95dda commit 29e77ba

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/ui/platform_dispatcher.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,10 @@ class Locale {
13191319
/// [region](https://github.com/unicode-org/cldr/blob/master/common/validity/region.xml) for
13201320
/// each of languageCode, scriptCode and countryCode respectively.
13211321
///
1322+
/// The [languageCode] subtag is optional. When there is no language subtag,
1323+
/// the parameter should be omitted or set to "und". When not supplied, the
1324+
/// [languageCode] defaults to "und", an undefined language code.
1325+
///
13221326
/// The [countryCode] subtag is optional. When there is no country subtag,
13231327
/// the parameter should be omitted or passed `null` instead of an empty-string.
13241328
///

testing/dart/window_hooks_integration_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ void main() {
428428
});
429429

430430
test('PlatformDispatcher.locale returns unknown locale when locales is set to empty list', () {
431-
Locale? locale;
431+
late Locale locale;
432432
runZoned(() {
433433
window.onLocaleChanged = () {
434434
locale = PlatformDispatcher.instance.locale;
@@ -437,5 +437,6 @@ void main() {
437437

438438
_updateLocales(<String>[]);
439439
expectEquals(locale, const Locale.fromSubtags());
440+
expectEquals(locale.languageCode, 'und');
440441
});
441442
}

0 commit comments

Comments
 (0)