ZetaListItem class Components
A single row that typically contains some text as well as a leading or trailing widgets.
To create list items with a ZetaSwitch, ZetaCheckbox, or ZetaRadio, use the ZetaListItem.toggle, ZetaListItem.checkbox or the ZetaListItem.radio named constructors respectively.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ZetaStatelessWidget
- ZetaListItem
- Available Extensions
Constructors
- ZetaListItem({required String primaryText, String? secondaryText, Widget? leading, VoidCallback? onTap, bool? showDivider, Widget? trailing, Key? key, bool? rounded})
-
Creates a ZetaListItem.
const
-
ZetaListItem.checkbox({Key? key, bool? rounded, required String primaryText, String? secondaryText, Widget? leading, bool? showDivider, bool value = false, ValueChanged<
bool> ? onChanged, bool useIndeterminate = false}) - Creates a ZetaListItem with a ZetaCheckbox in the trailing widget space.
- ZetaListItem.radio({required String primaryText, required dynamic value, String? secondaryText, Widget? leading, bool? showDivider, dynamic groupValue, Key? key, bool? rounded, ValueChanged? onChanged})
- Creates a ZetaListItem with a ZetaRadio in the trailing widget space.
-
ZetaListItem.toggle({Key? key, bool? rounded, required String primaryText, String? secondaryText, bool? showDivider, Widget? leading, bool value = false, ValueChanged<
bool?> ? onChanged}) - Creates a ZetaListItem with a ZetaSwitch in the trailing widget space.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget?
-
A widget to display before the title;
final
- onTap → VoidCallback?
-
Called when user taps on the ZetaListItem.
final
- primaryText → String
-
The primary text of the ZetaListItem.
final
- rounded → bool?
-
Sets rounded or sharp border of the containing box and the icon style.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondaryText → String?
-
The secondary text of the ZetaListItem.
final
- showDivider → bool?
-
Adds a border to the bottom of the list item.
If this isn't provided and the item is used in a ZetaList, the value is fetched from the showDivider prop on the ZetaList.
final
- trailing → Widget?
-
A widget to display after the primary text.
If this is a checkbox, radio button, or switch, use the relevant named constructor.
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.
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