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)