Data Presentation

Item

An item is typically used to group related information together.

This widget is typically used to create more complex widgets rather than being used directly.

1@override
2Widget build(BuildContext _) => FItem(
3 prefix: const Icon(FIcons.user),
4 title: const Text('Personalization'),
5 suffix: const Icon(FIcons.chevronRight),
6 onPress: () {},
7);
8

CLI

To generate and customize this style:

dart run forui style create item

Usage

FItem(...)

1FItem(
2 style: const .delta(margin: .zero),
3 enabled: true,
4 selected: false,
5 onPress: () {},
6 title: const Text('Title'),
7 prefix: const Icon(FIcons.user),
8 subtitle: const Text('Subtitle'),
9 details: const Text('Details'),
10 suffix: const Icon(FIcons.chevronRight),
11)

FItem.raw(...)

1FItem.raw(
2 style: const .delta(margin: .zero),
3 enabled: true,
4 selected: false,
5 onPress: () {},
6 child: const Text('Content'),
7 prefix: const Icon(FIcons.user),
8)

Examples

Untappable

1@override
2Widget build(BuildContext _) => FItem(
3 prefix: const Icon(FIcons.user),
4 title: const Text('Personalization'),
5 suffix: const Icon(FIcons.chevronRight),
6);
7

Disabled

1@override
2Widget build(BuildContext _) => FItem(
3 enabled: false,
4 prefix: const Icon(FIcons.user),
5 title: const Text('Personalization'),
6 suffix: const Icon(FIcons.chevronRight),
7 onPress: () {},
8);
9

With Subtitle

1@override
2Widget build(BuildContext _) => FItem(
3 prefix: const Icon(FIcons.bell),
4 title: const Text('Notifications'),
5 subtitle: const Text('Banners, Sounds, Badges'),
6 suffix: const Icon(FIcons.chevronRight),
7 onPress: () {},
8);
9

With Details

1@override
2Widget build(BuildContext _) => FItem(
3 prefix: const Icon(FIcons.wifi),
4 title: const Text('WiFi'),
5 details: const Text('Duobase (5G)'),
6 suffix: const Icon(FIcons.chevronRight),
7 onPress: () {},
8);
9

On this page