WidgetListController class
WidgetListController Utility class for building children widgets with flexible spacing.
The BuildChildrenFlexGap
class provides a convenient way to manipulate and
process a list of child widgets, applying flexible spacing and layout modifications
based on specified parameters. It encapsulates functionality for adding spacing,
flexible spaces, and other layout adjustments to a list of widgets.
Parameters:
children
: The list of child widgets to be processed and manipulated.axis
: The axis (horizontal or vertical) along which to apply spacing and layout modifications.startSpacerIndex
: The index at which to add a flexible space widget (if applicable).globalSpace
: The amount of global spacing to be applied between elements.
Example usage:
BuildChildrenFlexGap builder = BuildChildrenFlexGap(
children: childrenList,
axis: Axis.horizontal,
startSpacerIndex: 1,
globalSpace: 10.0,
);
List<Widget> processedChildren = builder.withGlobalSpace();
Constructors
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
-
indexSpaceGlobalSpaceAndOrScrollable(
) → List< Widget> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withExpanded(
) → List< Widget> -
withExpanded Adds an ExpandedGap widget to the
spacedChildren
list if thestartSpacerIndex
is greater than 0. -
withGlobalSpace(
) → List< Widget> -
withGlobalSpace Adds a space widget to the
spacedChildren
list based on the specified global space value. -
withIndexSpace(
) → List< Widget> -
withIndexSpace Adds space widgets to the
spacedChildren
list based on specified indices.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited