use method
Appends a command to the list of commands.
final commands = Commands();
commands.use('foo', fooCommand);
commands.use('bar', barCommand, isDefault: true);
Implementation
void use(String name, Command command, {bool isDefault = false}) {
commands[name] = command;
if (isDefault) {
defaultCommand = command;
}
}