This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1319,6 +1319,10 @@ class Locale {
1319
1319
/// [region] (https://github.com/unicode-org/cldr/blob/master/common/validity/region.xml) for
1320
1320
/// each of languageCode, scriptCode and countryCode respectively.
1321
1321
///
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
+ ///
1322
1326
/// The [countryCode] subtag is optional. When there is no country subtag,
1323
1327
/// the parameter should be omitted or passed `null` instead of an empty-string.
1324
1328
///
Original file line number Diff line number Diff line change @@ -428,7 +428,7 @@ void main() {
428
428
});
429
429
430
430
test ('PlatformDispatcher.locale returns unknown locale when locales is set to empty list' , () {
431
- Locale ? locale;
431
+ late Locale locale;
432
432
runZoned (() {
433
433
window.onLocaleChanged = () {
434
434
locale = PlatformDispatcher .instance.locale;
@@ -437,5 +437,6 @@ void main() {
437
437
438
438
_updateLocales (< String > []);
439
439
expectEquals (locale, const Locale .fromSubtags ());
440
+ expectEquals (locale.languageCode, 'und' );
440
441
});
441
442
}
You can’t perform that action at this time.
0 commit comments