FTabs constructor
FTabs({
- required List<
FTabEntry> tabs, - int initialIndex = 0,
- bool scrollable = false,
- FTabController? controller,
- FTabsStyle? style,
- ValueChanged<
int> ? onPress, - Key? key,
Creates a FTabs.
Throws
Implementation
FTabs({
required this.tabs,
this.initialIndex = 0,
this.scrollable = false,
this.controller,
this.style,
this.onPress,
super.key,
}) : assert(tabs.isNotEmpty, 'Must have at least 1 tab provided.'),
assert(0 <= initialIndex && initialIndex < tabs.length, 'Initial index must be within the range of tabs.'),
assert(
controller == null || controller.index == initialIndex,
'Controller index must match the initial index.',
),
assert(
controller == null || controller.length == tabs.length,
'Controller length must match the number of tabs.',
);