Skip to content

Commit 2ea5c63

Browse files
author
Mouthwatering777
committed
Remove desktop locale workaround (#261)
The desktop embeddings now set locales on startup, so there is no longer a need to work around the lack of locale. Fixes flutter/gallery#35
1 parent 96dd706 commit 2ea5c63

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/data/gallery_options.dart

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// found in the LICENSE file.
44

55
import 'dart:async';
6-
import 'dart:io' show Platform;
76

87
import 'package:flutter/foundation.dart';
98
import 'package:flutter/material.dart';
@@ -68,14 +67,7 @@ class GalleryOptions {
6867
}
6968
}
7069

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);
70+
Locale get locale => _locale ?? deviceLocale;
7971

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

0 commit comments

Comments
 (0)