v0.0.2rounded_tabbar_widget
一个简单的 Flutter 包,用于创建带有自定义 TabBar 的 TabBarView 布局。
18喜欢 14近 30 天下载140Pub 分数
AndroidiOSWebmacOSWindowsLinux
一个简单的 Flutter 包,用于创建带有自定义 TabBar 的 TabBarView 布局。
以下为英文项目原文快照,最新内容请访问 GitHub。
Language: English
A simple flutter package for creating a TabBarView layout with custom Tabbar.
Technical Notes: The layout for pages is built using TabbarView and layout of Tab buttons is customised. This package supports pages to be scrolled too.
the usage is very simple, just use the following
RoundedTabbarWidget(
tabIcons: [
Icons.home,
Icons.favorite,
Icons.chat,
Icons.person,
],
pages: [
HomePageWidget(),
FavoritePageWidget(),
MessagesPageWidget(),
ProfilePageWidget(),
],
selectedIndex: 0,
onTabItemIndexChanged: (int index) {
print('Index: $index');
},
),
| parameter | description | default |
|---|---|---|
| onTabItemIndexChanged | Completion Handler which returns index of current tab page | (int index) {} |
| tabIcons | List of Tab Icons | Pass List of IconData parameter |
| pages | List of Tab Pages | Pass List of Tab widgets parameter |
| selectedIndex | Index of tab page to be shown selected initially | This is a optional parameter |
| itemNormalColor | Color of Tabbar item for normal state | This is a optional parameter |
| itemSelectedColor | Color of Tabbar item for selected state | This is a optional parameter |
| tabBarBackgroundColor | Background color of Tabbar | This is a optional parameter |
Please note the number of pages and tabIcons should be equal.
依赖清单 2 项
{"sdk":"flutter"}{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗