t×tecexpressby TeKOcloud
DEv0.7.1
Data & views / FLUTTER

TxList.

Interactive preview

List with search, selection and optional deletion or reordering through events.

TxList

ParameterTypeDefaultMeaning
itemsList<T>const []Entries; replaced by dataSource when bound.
dataSourceObject?nullList, configuration or DataSource instance; takes precedence over items.
textOfString Function(T)requiredVisible list text getter.
keyOfObject Function(T)requiredReads the stable record key.
itemBuilderWidget Function(BuildContext, T)?nullBuilds custom content; callback arguments and return type are given in the signature.
groupOfString? Function(T)?nullList grouping getter.
selectedKeysSet<Object>const {}Selected entry keys.
onSelectionChangedValueChanged<Set<Object>>?nullReports selection; update controlled state in the callback.
onItemClickValueChanged<T>?nullReports the activated entry; arguments follow the callback signature.
onDeleteValueChanged<T>?nullReports the list entry to delete; the application updates its list.
onReordervoid Function(int, int)?nullReports source and target indices; the application updates its list.
selectionTxSelectionModeTxSelectionMode.noneSelection mode.
searchEnabledboolfalseEnables searching.
heightdouble300Height; Vue numbers use pixels, Flutter uses logical pixels.
itemExtentdouble?nullFixed Flutter list row height when specified.
disabledboolfalseDisables interaction.
dart
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);
}