CallbackExecutor class
Callback-based command executor.
Convenient way to create executors from function callbacks without creating a full class.
- Inheritance
-
- Object
- CommandExecutor
- CallbackExecutor
Constructors
-
CallbackExecutor({required Future<
ItemResult> onExecute(CommandContext context, CliArgs args), Future<ToolResult> onExecuteWithoutTraversal(CliArgs args)?})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onExecute
→ Future<
ItemResult> Function(CommandContext context, CliArgs args) -
Callback executed for each folder.
final
-
onExecuteWithoutTraversal
→ Future<
ToolResult> Function(CliArgs args)? -
Callback for non-traversal execution.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
execute(
CommandContext context, CliArgs args) → Future< ItemResult> -
Execute command on a single folder.
override
-
executeWithoutTraversal(
CliArgs args) → Future< ToolResult> -
Execute command without traversal.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited