forked from firka/flutter
[flutter_tools] fix RangeError in gen-l10n by checking for empty string (#107604)
This commit is contained in:
committed by
GitHub
parent
d72853940f
commit
94da724868
@@ -1050,6 +1050,9 @@ class LocalizationsGenerator {
|
||||
}
|
||||
|
||||
static bool _isValidGetterAndMethodName(String name) {
|
||||
if (name.isEmpty) {
|
||||
return false;
|
||||
}
|
||||
// Public Dart method name must not start with an underscore
|
||||
if (name[0] == '_') {
|
||||
return false;
|
||||
|
||||
@@ -124,6 +124,9 @@ class L10nException implements Exception {
|
||||
L10nException(this.message);
|
||||
|
||||
final String message;
|
||||
|
||||
@override
|
||||
String toString() => message;
|
||||
}
|
||||
|
||||
// One optional named parameter to be used by a NumberFormat.
|
||||
|
||||
Reference in New Issue
Block a user