List with search, selection and optional deletion or reordering through events.
TxList
| Parameter | Type | Default | Meaning |
|---|---|---|---|
| items | List<T> | const [] | Entries; replaced by dataSource when bound. |
| dataSource | Object? | null | List, configuration or DataSource instance; takes precedence over items. |
| textOf | String Function(T) | required | Visible list text getter. |
| keyOf | Object Function(T) | required | Reads the stable record key. |
| itemBuilder | Widget Function(BuildContext, T)? | null | Builds custom content; callback arguments and return type are given in the signature. |
| groupOf | String? Function(T)? | null | List grouping getter. |
| selectedKeys | Set<Object> | const {} | Selected entry keys. |
| onSelectionChanged | ValueChanged<Set<Object>>? | null | Reports selection; update controlled state in the callback. |
| onItemClick | ValueChanged<T>? | null | Reports the activated entry; arguments follow the callback signature. |
| onDelete | ValueChanged<T>? | null | Reports the list entry to delete; the application updates its list. |
| onReorder | void Function(int, int)? | null | Reports source and target indices; the application updates its list. |
| selection | TxSelectionMode | TxSelectionMode.none | Selection mode. |
| searchEnabled | bool | false | Enables searching. |
| height | double | 300 | Height; Vue numbers use pixels, Flutter uses logical pixels. |
| itemExtent | double? | null | Fixed Flutter list row height when specified. |
| disabled | bool | false | Disables interaction. |
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';
Widget example() {
return TxList<String>(items: const ['One', 'Two'], keyOf: (v) => v, textOf: (v) => v, searchEnabled: true);
}