ZdsListGroup class
A component that groups items within a ZdsList, eliminating padding between them.
This component can be utilized with a predefined list of items or with a dynamic builder for its children.
It is not advisable to use this for lists whose length might change dynamically. This component attempts to construct all its children at once, which could degrade performance with a long list of children. For such cases, consider using a ListView.builder and enclosing each ZdsListTile within a ZdsListTileWrapper.
Note: You cannot specify both a child and items simultaneously.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ZdsListGroup
- Available extensions
Constructors
-
ZdsListGroup({Key? key, List<
Widget> ? items, Color? itemsBackgroundColor, Widget? child, Text? headerLabel, List<Widget> ? headerActions, ZdsCardVariant cardVariant = ZdsCardVariant.elevated, EdgeInsets? padding}) -
Constructs a ZdsListGroup.
const
Properties
- cardVariant → ZdsCardVariant
-
Whether to use an outlined or elevated card.
final
- child → Widget?
-
A ZdsList child that can be a ZdsList.builder.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headerActions
→ List<
Widget> ? -
A list of widgets that are displayed in the header of the list aligned to the end.
final
- headerLabel → Text?
-
A label that goes in the header of this component above the list aligned to the start.
final
-
items
→ List<
Widget> ? -
Items in the list.
final
- itemsBackgroundColor → Color?
-
Background color.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- padding → EdgeInsets?
-
Padding around the outside of the list group.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited