Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/ui/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ class Locale {
/// the region subtag should be uppercase.
const Locale(this._languageCode, [ this._countryCode ]) : assert(_languageCode != null);

/// Empty locale constant. This is an invalid locale.
static const Locale none = const Locale('', '');

/// The primary language subtag for the locale.
///
/// This must not be null.
Expand Down Expand Up @@ -440,7 +443,7 @@ class Window {
if (_locales != null && _locales.isNotEmpty) {
return _locales.first;
}
return null;
return Locale.none;
}

/// The full system-reported supported locales of the device.
Expand Down