GenerateMiddlewareDef<CustomOptions> class
final
A named, configurable middleware, built with generateMiddleware or
ai.defineGenerateMiddleware.
Call it to build the ref passed to use::
use: [logging(LoggingOptions(level: 'debug'))]
use: [logging()] // config is optional
final with a private constructor: build one with generateMiddleware.
Owning the only implementation lets members be added without breaking
anyone, and lets refs be type-checked against CustomOptions when they
are resolved (see createMiddlewareFromRef).
Properties
-
configJsonSchema
→ Map<
String, Object?> ? -
no setter
-
configSchema
→ SchemanticType<
CustomOptions> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
[CustomOptions? config]) → GenerateMiddlewareRef< CustomOptions> -
Builds a ref to this middleware for
use:, with an optionalconfig. -
create(
CustomOptions? config, GenerateMiddlewareContext ctx) → GenerateMiddleware -
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