buildArgParser method
构建自己的命令参数
Implementation
@override
void buildArgParser(ArgParser argParser) {
argParser.addOption('flavor', abbr: 'f', help: '''
Build a custom app flavor as defined by platform-specific build setup.
Supports the use of product flavors in Android Gradle scripts, and the use of custom Xcode schemes.
''');
argParser.addOption('target=<path>', abbr: 't', help: '''
The main entry-point file of the application, as run on the device.
If the "--target" option is omitted, but a file name is provided on the command line, then that is used instead.
(defaults to "lib\\main.dart")
''');
argParser.addFlag('split-per-abi', abbr: 's', help: '''
Whether to split the APKs per ABIs. To learn more,
see: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-s
''');
argParser.addOption('target-platform', abbr: 'P', allowed: ['android-arm', 'android-arm64', 'android-x86', 'android-x64'], help: '''
The target platform for which the app is compiled.
[android-arm, android-arm64 (default), android-x86, android-x64]
''');
argParser.addOption('dart-define=<foo=bar>', abbr: 'p', help: '''
Additional key-value pairs that will be available as constants from the String.fromEnvironment,
bool.fromEnvironment, and int.fromEnvironment constructors.
Multiple defines can be passed by repeating "--dart-define" multiple times.
''');
argParser.addOption('dart-define-from-file=<use-define-config.json|.env>', abbr: 'e', help: '''
The path of a .json or .env file containing key-value pairs that will be available as environment variables.
These can be accessed using the String.fromEnvironment, bool.fromEnvironment, and int.fromEnvironment constructors.
Multiple defines can be passed by repeating "--dart-define-from-file" multiple times.
''');
}