better_command_runner
library
Typedefs
-
BuildCommandLinePropertiesForAnalytics
= Map<String, dynamic> Function<O extends OptionDefinition, T>(CommandContext<O, T> context)
-
A function type for building command line properties for analytics.
-
OnAnalyticsEvent
= void Function(CommandContext<OptionDefinition, dynamic>? context, String event, Map<String, dynamic> properties)
-
A function type for tracking events.
-
OnBeforeRunCommand
= Future<void> Function(BetterCommandRunner<OptionDefinition, dynamic> runner)
-
A function type for executing code before running a command.
-
SetLogLevel
= void Function({String? commandName, required CommandRunnerLogLevel parsedLogLevel})
-
A function type for setting the log level.
The
logLevel is the log level to set.
The commandName is the name of the command if custom rules for log
levels are needed.
Exceptions / Errors
-
ExitException
-
An exception that can be thrown to exit the command with a specific exit code.