Searchable single selection backed by a loadable data source.
TxLookup
| 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. |
| value | T? | null | Current input/option value. |
| onChanged | ValueChanged<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. |
| searchEnabled | bool | true | Enables searching. |
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';
Widget example() {
const options = [TxItem(value: 1, text: 'One'), TxItem(value: 2, text: 'Two')];
int? choice = 1;
return StatefulBuilder(
builder: (context, setState) => TxLookup<int>(items: options, value: choice, onChanged: (v) => setState(() => choice = v)),
);
}