CommandMiddlewareHooks<O extends OptionDefinition, T> class
Convenience class for easier type binding of MiddlewareHooks for commands.
- Inheritance
-
- Object
- MiddlewareHooks<
T?, CommandContext< O, T> > - CommandMiddlewareHooks
Constructors
- CommandMiddlewareHooks()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
middleware(
Handler< FutureOr< next) → Handler<T?> , CommandContext<O, T> >FutureOr< T?> , CommandContext<O, T> > -
Middleware method that produces the handler that runs these hooks.
Adheres to the Middleware signature.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
Object error, StackTrace stackTrace, CommandContext< O, T> arg) → FutureOr<T?> -
Hook method that is called if the next handler throws.
inherited
-
onFinally(
CommandContext< O, T> arg) → FutureOr<void> -
Hook method that is called after the next handler returns or throws,
after the onReturn / onError hook has run.
inherited
-
onReturn(
CommandContext< O, T> arg, T? response) → FutureOr<T?> -
Hook method that is called after the next handler returns normally.
inherited
-
onRun(
CommandContext< O, T> arg) → FutureOr<CommandContext< O, T> > -
Hook method that is called before the next handler is run.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited