Replace<C> class final

Full replacement of a slot — default is ignored (intentional).

Use when you need complete control over the slot's rendering. LSP: Contract build() is respected, but semantics = "full takeover".

Example

Replace((ctx) => MyCustomWidget(
  isSelected: ctx.isSelected,
  label: ctx.label,
))
Inheritance

Constructors

Replace(Widget builder(C ctx))
const

Properties

builder Widget Function(C ctx)
Builder that receives context and returns a widget.
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