DevCommand constructor
DevCommand({
- required String rootPath,
- required List<
ConstructMaker> constructs, - required FileSystem fs,
- required Logger logger,
- required Analyzer analyzer,
- RoutesHandler? routesHandler,
Implementation
DevCommand({
required this.rootPath,
required this.constructs,
required this.fs,
required this.logger,
required this.analyzer,
RoutesHandler? routesHandler,
}) : routesHandler =
routesHandler ??
RoutesHandler(analyzer: analyzer, fs: fs, rootPath: rootPath) {
argParser
..addOption(
'flavor',
abbr: 'f',
help: 'The flavor to use for the app (case-sensitive)',
)
..addFlag(
'release',
help:
'Whether to run in release mode. Disabled hot reload, '
'debugger, and logger',
)
..addFlag(
'profile',
help:
'Whether to run in profile mode. Enables logger, '
'but disables hot reload and debugger',
)
..addFlag(
'debug',
help:
'(Default) Whether to run in debug mode. Enables hot reload, '
'debugger, and logger',
)
..addFlag(
'generate-only',
help: 'Only generate the constructs, does not run the server',
negatable: false,
hide: true,
)
..addOption(
'dart-vm-service-port',
help: 'The port to use for the Dart VM service',
defaultsTo: '0',
)
..addMultiOption(
'dart-define',
abbr: 'D',
help: 'Additional key-value pairs that will be available as constants.',
valueHelp: 'BASE_URL=https://api.example.com',
)
..addMultiOption(
'dart-define-from-file',
help:
'A file containing additional key-value '
'pairs that will be available as constants.',
valueHelp: '.env',
);
}