Enhance<C> class
final
Enhancement of the default — transforms context before calling defaults.
Use when you need to modify parameters but keep the default structure.
Example
Enhance((ctx) => ctx.copyWith(
textStyle: ctx.textStyle.copyWith(fontWeight: FontWeight.bold),
))
- Inheritance
-
- Object
- SlotOverride<
C> - Enhance
Constructors
- Enhance(C enhancer(C ctx))
-
const
Properties
- enhancer → C Function(C ctx)
-
Function that transforms the context.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
C ctx, Widget defaults(C)) → Widget -
Build the slot widget.
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