v0.1.5
ff_navigation_bar
可配置的底部导航栏,带有突出显示和阴影
159喜欢 83近 30 天下载40Pub 分数
平台暂无数据
可配置的 Flutter 导航栏
{"sdk":"flutter"}^4.0.2{"sdk":"flutter"}以下为英文项目原文快照,最新内容请访问 GitHub。
A highly configurable navigation bar with emphasis for the selected item. https://raw.githubusercontent.com/55Builds/Flutter-FFNavigationBar/HEAD/navbar-demo.gif
dependencies:
ff_navigation_bar: ^0.1.5
import 'package:flutter/material.dart';
import 'package:ff_navigation_bar/ff_navigation_bar.dart';
...
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'Demonstration',
),
],
),
),
bottomNavigationBar: FFNavigationBar(
theme: FFNavigationBarTheme(
barBackgroundColor: Colors.white,
selectedItemBorderColor: Colors.yellow,
selectedItemBackgroundColor: Colors.green,
selectedItemIconColor: Colors.white,
selectedItemLabelColor: Colors.black,
),
selectedIndex: selectedIndex,
onSelectTab: (index) {
setState(() {
selectedIndex = index;
});
},
items: [
FFNavigationBarItem(
iconData: Icons.calendar_today,
label: 'Schedule',
),
FFNavigationBarItem(
iconData: Icons.people,
label: 'Contacts',
),
FFNavigationBarItem(
iconData: Icons.attach_money,
label: 'Bills',
),
FFNavigationBarItem(
iconData: Icons.note,
label: 'Notes',
),
FFNavigationBarItem(
iconData: Icons.settings,
label: 'Settings',
),
],
),
);
The navbar has a Theme class which can be used to define the majority of appearance settings for the navbar and its items.
Function(int selectedIndex)