Searchable multiple selection with tags. Select all applies to loaded results.
TxTagBox
| Parameter | Type | Default | Meaning |
|---|---|---|---|
| items | List<TxItem<T>> | const [] | Entries; replaced by dataSource when bound. |
| dataSource | Object? | null | List, configuration or DataSource instance; takes precedence over items. |
| values | Set<T> | const {} | Currently selected values. |
| onChanged | ValueChanged<Set<T>>? | null | Callback for changed; see the signature for arguments and return type. |
| disabled | bool | false | Disables interaction. |
| label | String | 'Auswählen' | Label or accessible name. |
| maxDisplayedTags | int | 4 | Maximum visible tags before summarizing. |
| applyOnConfirm | bool | false | Applies selection only on confirmation. |
| onCustomItemCreating | FutureOr<TxItem<T>> Function(String)? | null | Creates a TxItem synchronously or asynchronously from entered text. |
| showSelectionControls | bool | true | Shows multiple/select-all controls. |
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';
Widget example() {
const options = [TxItem(value: 1, text: 'One'), TxItem(value: 2, text: 'Two')];
var keys = <int>{};
return StatefulBuilder(
builder: (context, setState) => TxTagBox<int>(items: options, values: keys, onChanged: (v) => setState(() => keys = v)),
);
}