ListItem class

A standard list tile item supporting leading/trailing slots and primary/secondary text.

Inheritance

Constructors

ListItem({Key? key, String title = 'Title of the list item', String? subtitle = 'Subtitle of the list item', bool hasSubtitle = true, bool hasLeftSlot = true, bool hasRightSlotOne = true, bool hasRightSlotTwo = true, Widget? leftSlot, Widget? rightSlotOne, Widget? rightSlotTwo, VoidCallback? onTap})
Creates a ListItem instance.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasLeftSlot → bool
Whether the leading slot should be rendered.
final
hasRightSlotOne → bool
Whether the first trailing slot should be rendered.
final
hasRightSlotTwo → bool
Whether the second trailing slot should be rendered.
final
hasSubtitle → bool
Whether the subtitle should be rendered if present.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leftSlot → Widget?
Custom widget for the leading left slot.
final
onTap → VoidCallback?
Callback executed when the item is tapped.
final
rightSlotOne → Widget?
Custom widget for the first trailing right slot.
final
rightSlotTwo → Widget?
Custom widget for the second trailing right slot.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subtitle → String?
Optional subtitle text.
final
title → String
Primary headline text of the list item.
final

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.
inherited
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, int wrapWidth = 65}) → 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

Constants

version → const String
Component version for reference. v1.0.1: Aligned subtitle color to AlterSemanticTokens.textDisabled (#99A1AF) and default right slot 2 to favorite heart toggle matching Figma node 130:4639.