LocalCommandRegistry class
An extensible registry of local : commands.
Third-party packages register custom LocalCommands to extend the interactive experience. The built-in set is installed by LocalCommandRegistry.withDefaults.
Constructors
- LocalCommandRegistry()
- Creates an empty registry.
- LocalCommandRegistry.withDefaults()
-
Creates a registry pre-populated with the built-in commands.
factory
Properties
-
commands
→ List<
LocalCommand> -
The registered commands (de-duplicated, sorted by name).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
handle(
String line, LocalCommandContext context) → Future< bool> -
Handles a local-command
line, returningtrueif a command ran. -
isLocalCommand(
String line) → bool -
Whether
lineis a local command (begins with:). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
LocalCommand command) → void -
Registers
commandunder its name and aliases. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited