The interface for a positioning middleware.
Middleware are functions that run sequentially to compute the final
position of the overlay. They can modify the PositionState and
optionally produce metadata of type T.
The generic type T declares what kind of data this middleware produces.
Use void if the middleware doesn't produce any metadata.
Example:
class FlipMiddleware implements PositioningMiddleware<FlipData> {
@override
(PositionState, FlipData?) run(PositionState state) {
// ... flip logic
return (newState, FlipData(wasFlipped: true));
}
}
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
PositionState state) → (PositionState, T?) - Runs the middleware logic.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited