Skip to main content

List Item

A single row in a list with optional leading icon, title, subtitle, and trailing widget.

When to use it

Use ListItem to render rows in a settings list, contact list, or any vertically stacked list of similar entries. Provide onTap to make the row interactive; omit it for a static, non-interactive row.

Import

import 'package:catalyst_ui/catalyst_ui.dart';

Usage

ListItem(
leading: const Icon(Icons.person),
title: const Text('Account'),
subtitle: const Text('Manage your profile'),
trailing: const Icon(Icons.chevron_right),
onTap: _openAccount,
)

Parameters

ParameterTypeDefaultDescription
titleWidgetrequiredThe primary label.
dividerbooltrueWhether to render a bottom border below the item.
paddingEdgeInsetsEdgeInsets.all(Spacing.s4)Inner padding applied to the row.
borderRadiusBorderRadiusBorderRadius.zeroOptional border radius.
leadingWidget?nullAn optional widget at the start of the row, typically an icon.
subtitleWidget?nullAn optional secondary line below title.
trailingWidget?nullAn optional widget at the end of the row.
onTapVoidCallback?nullCalled when the item is tapped. When null, the row is non-interactive.