Tabs
Tab-based interface for switching content.
File: example/lib/widgets/tabs.dart
Factory Methods
FBTabs.basic()- Simple tabsFBTabs.scrollable()- Scrollable tab listFBTabs.icon()- Icon-based tabsFBTabs.custom()- Fully customizable
Properties
tabs: List<Tab>
controller: TabController
onTap: Function(int)
indicatorColor: Color
labelColor: Color
unselectedLabelColor: Color
Usage Example
DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
bottom: FBTabs.basic(
tabs: [
Tab(text: 'Tab 1'),
Tab(text: 'Tab 2'),
Tab(text: 'Tab 3'),
],
),
),
body: TabBarView(
children: [
Center(child: Text('Content 1')),
Center(child: Text('Content 2')),
Center(child: Text('Content 3')),
],
),
),
)
Product Categories
FBTabs.scrollable(
tabs: [
Tab(text: 'Electronics'),
Tab(text: 'Clothing'),
Tab(text: 'Books'),
Tab(text: 'Home &'),
Tab(text: 'Sports'),
],
)