mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
Flutter upgrade
This commit is contained in:
parent
c921ad890a
commit
1beb18b045
505 changed files with 6657 additions and 5875 deletions
|
@ -33,8 +33,8 @@ const part2 = """
|
|||
];
|
||||
}
|
||||
|
||||
LocaleListResolutionCallback listResolution({Locale fallback, bool withCountry = true}) {
|
||||
return (List<Locale> locales, Iterable<Locale> supported) {
|
||||
LocaleListResolutionCallback listResolution({required Locale fallback, bool withCountry = true}) {
|
||||
return (List<Locale>? locales, Iterable<Locale> supported) {
|
||||
if (locales == null || locales.isEmpty) {
|
||||
return fallback ?? supported.first;
|
||||
} else {
|
||||
|
@ -43,8 +43,8 @@ const part2 = """
|
|||
};
|
||||
}
|
||||
|
||||
LocaleResolutionCallback resolution({Locale fallback, bool withCountry = true}) {
|
||||
return (Locale locale, Iterable<Locale> supported) {
|
||||
LocaleResolutionCallback resolution({required Locale fallback, bool withCountry = true}) {
|
||||
return (Locale? locale, Iterable<Locale> supported) {
|
||||
return _resolve(locale, fallback, supported, withCountry);
|
||||
};
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ const part3 = """
|
|||
@override
|
||||
bool shouldReload(GeneratedLocalizationsDelegate old) => false;
|
||||
|
||||
Locale _resolve(Locale locale, Locale fallback, Iterable<Locale> supported, bool withCountry) {
|
||||
Locale _resolve(Locale? locale, Locale fallback, Iterable<Locale> supported, bool withCountry) {
|
||||
if (locale == null || !_isSupported(locale, withCountry)) {
|
||||
return fallback ?? supported.first;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ const part3 = """
|
|||
if (supportedLocale.countryCode == locale.countryCode) {
|
||||
return true;
|
||||
}
|
||||
if (true != withCountry && (supportedLocale.countryCode == null || supportedLocale.countryCode.isEmpty)) {
|
||||
if (true != withCountry && (supportedLocale.countryCode == null || supportedLocale.countryCode!.isEmpty)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -105,8 +105,8 @@ const part3 = """
|
|||
}
|
||||
|
||||
String getLang(Locale l) => l == null
|
||||
? null
|
||||
: l.countryCode != null && l.countryCode.isEmpty
|
||||
? throw Exception('Incorrect local')
|
||||
: l.countryCode != null && l.countryCode!.isEmpty
|
||||
? l.languageCode
|
||||
: l.toString();
|
||||
""";
|
Loading…
Add table
Add a link
Reference in a new issue