Skip to content

Commit ba4ad68

Browse files
Remove desktop locale workaround
The desktop embeddings now set locales on startup, so there is no longer a need to work around the lack of locale. Fixes flutter#35
1 parent 9cf3b20 commit ba4ad68

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/data/gallery_options.dart

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,7 @@ class GalleryOptions {
6868
}
6969
}
7070

71-
Locale get locale =>
72-
_locale ??
73-
deviceLocale ??
74-
// TODO: When deviceLocale can be obtained on desktop, this won't be necessary
75-
// https://github.com/flutter/flutter/issues/45152
76-
(!kIsWeb && (Platform.isMacOS || Platform.isWindows || Platform.isLinux)
77-
? const Locale('en', 'US')
78-
: null);
71+
Locale get locale => _locale ?? deviceLocale;
7972

8073
/// Returns a text direction based on the [CustomTextDirection] setting.
8174
/// If it is based on locale and the locale cannot be determined, returns

0 commit comments

Comments
 (0)