#151 fix
This commit is contained in:
@@ -10,7 +10,10 @@ extension LocaleX on Locale {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension String2Locale on String {
|
extension String2Locale on String {
|
||||||
Locale get toLocale {
|
Locale? get toLocale {
|
||||||
|
if (isEmpty) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
final parts = split('_');
|
final parts = split('_');
|
||||||
if (parts.length == 1) {
|
if (parts.length == 1) {
|
||||||
return Locale(parts[0]);
|
return Locale(parts[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user