Tab navigation with optional content for the active tab.
TxTabs
| Parameter | Type | Default | Meaning |
|---|---|---|---|
| items | List<TxMenuItem> | const [] | Entries; replaced by dataSource when bound. |
| dataSource | Object? | null | List, configuration or DataSource instance; takes precedence over items. |
| selectedIndex | int? | null | Zero-based active entry. |
| initialIndex | int | 0 | Initial tab in uncontrolled mode. |
| onChanged | ValueChanged<int>? | null | Callback for changed; see the signature for arguments and return type. |
| builder | Widget Function(BuildContext context, int selectedIndex)? | null | Builds custom content; callback arguments and return type are given in the signature. |
| disabled | bool | false | Disables interaction. |
| label | String | 'Reiter' | Label or accessible name. |
| orientation | Axis | Axis.horizontal | Tab orientation. |
| swipeEnabled | bool | false | Allows switching tabs by swiping. |
| animationEnabled | bool | true | Enables content transitions. |
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';
Widget example() {
return TxTabs(items: const [TxMenuItem('Home'), TxMenuItem('Settings')], builder: (context, index) => Text('Page $index'));
}