buildCommandLinePropertiesForAnalytics<O extends OptionDefinition, T> function
Map<String, dynamic>
buildCommandLinePropertiesForAnalytics<O extends OptionDefinition, T>(
- CommandContext<
O, T> context
Builds analytics properties for the command line represented by context
from the new Command framework.
The result contains flag_<name> for flags set on the command line,
option_<name> for other command-line options with values replaced by
xxx, and full_command, a sanitized command line. Only values set on
the command line are included.
context may be any command in the chain; the description runs from the
root command through the leaf. The executable name is not included.
Subcommands and options are written with their canonical names, and options
follow definition order on the command that owns them. A -- separator is
restored before a positional that starts with -, which is only possible
for arguments passed through after --.
Implementation
Map<String, dynamic> buildCommandLinePropertiesForAnalytics<
O extends OptionDefinition,
T
>(final CommandContext<O, T> context) {
return _CommandContextPropertiesBuilder<T>(context.root()).build();
}