t×tecexpressby TeKOcloud
DEv0.7.1
Navigation & feedback / FLUTTER

TxTabPanel.

Interactive preview

Tabs and their active content in one view.

TxTabPanel

ParameterTypeDefaultMeaning
itemsList<TxMenuItem>const []Entries; replaced by dataSource when bound.
dataSourceObject?nullList, configuration or DataSource instance; takes precedence over items.
selectedIndexint?nullZero-based active entry.
onChangedValueChanged<int>?nullCallback for changed; see the signature for arguments and return type.
builderWidget Function(BuildContext, int)requiredBuilds custom content; callback arguments and return type are given in the signature.
disabledboolfalseDisables interaction.
orientationAxisAxis.horizontalTab orientation.
swipeEnabledboolfalseAllows switching tabs by swiping.
animationEnabledbooltrueEnables content transitions.
dart
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';

Widget example() {

  return TxTabPanel(items: const [TxMenuItem('Home')], builder: (context, index) => Text('Page $index'));
}