We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbe5b6f commit 07a608bCopy full SHA for 07a608b
lib/localization/form_builder_localizations.dart
@@ -6,8 +6,9 @@ import 'package:intl/intl.dart';
6
7
class FormBuilderLocalizations {
8
static Future<FormBuilderLocalizations> load(Locale locale) {
9
- final name =
10
- locale.countryCode.isEmpty ? locale.languageCode : locale.toString();
+ final name = (locale.countryCode?.isEmpty ?? true)
+ ? locale.languageCode
11
+ : locale.toString();
12
final localeName = Intl.canonicalizedLocale(name);
13
14
return initializeMessages(localeName).then((bool _) {
0 commit comments