Adds i18n to widget layer (#123620)

Adds i18n to widget layer
This commit is contained in:
chunhtai
2023-04-04 15:57:35 -07:00
committed by GitHub
parent c7bab2973e
commit 9e4b5fb7d9
124 changed files with 4171 additions and 66 deletions

View File

@@ -239,6 +239,10 @@ GeneratorOptions parseArgs(List<String> rawArgs) {
'remove-undefined',
help: 'Remove any localizations that are not defined in the canonical locale.',
)
..addFlag(
'widgets',
help: 'Whether to print the generated classes for the Widgets package only. Ignored when --overwrite is passed.',
)
..addFlag(
'material',
help: 'Whether to print the generated classes for the Material package only. Ignored when --overwrite is passed.',
@@ -254,6 +258,7 @@ GeneratorOptions parseArgs(List<String> rawArgs) {
}
final bool writeToFile = args['overwrite'] as bool;
final bool removeUndefined = args['remove-undefined'] as bool;
final bool widgetsOnly = args['widgets'] as bool;
final bool materialOnly = args['material'] as bool;
final bool cupertinoOnly = args['cupertino'] as bool;
@@ -261,6 +266,7 @@ GeneratorOptions parseArgs(List<String> rawArgs) {
writeToFile: writeToFile,
materialOnly: materialOnly,
cupertinoOnly: cupertinoOnly,
widgetsOnly: widgetsOnly,
removeUndefined: removeUndefined,
);
}
@@ -271,12 +277,14 @@ class GeneratorOptions {
required this.removeUndefined,
required this.materialOnly,
required this.cupertinoOnly,
required this.widgetsOnly,
});
final bool writeToFile;
final bool removeUndefined;
final bool materialOnly;
final bool cupertinoOnly;
final bool widgetsOnly;
}
// See also //master/tools/gen_locale.dart in the engine repo.