Tabs and their active content in one view.
TxTabPanel
| 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. |
| onChanged | ValueChanged<int>? | null | Callback for changed; see the signature for arguments and return type. |
| builder | Widget Function(BuildContext, int) | required | Builds custom content; callback arguments and return type are given in the signature. |
| disabled | bool | false | Disables interaction. |
| 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 TxTabPanel(items: const [TxMenuItem('Home')], builder: (context, index) => Text('Page $index'));
}