ConditionalSlotBuilder class
A slot builder that conditionally returns one of two builders based on a predicate.
The condition predicate takes ActiveLayoutInfo and returns true or false. If true, trueBuilder is used; otherwise, falseBuilder is used.
- Inheritance
-
- Object
- SlotBuilderType
- ConditionalSlotBuilder
Constructors
- ConditionalSlotBuilder({required bool condition(ActiveLayoutInfo layoutInfo), required SlotBuilderType trueBuilder, required SlotBuilderType falseBuilder})
- Creates a ConditionalSlotBuilder.
Properties
- condition → bool Function(ActiveLayoutInfo layoutInfo)
-
The condition to evaluate.
final
- falseBuilder → SlotBuilderType
-
The builder to use if the condition is false.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trueBuilder → SlotBuilderType
-
The builder to use if the condition is true.
final
Methods
-
build(
ActiveLayoutInfo layoutInfo) → Widget? -
Builds the widget for a slot based on the current ActiveLayoutInfo.
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