titled_navigation_bar 4.1.0 titled_navigation_bar: ^4.1.0 copied to clipboard
A beautiful, clean and simple bottom navigation bar with smooth animation on click. This package is high customizable, read more bellow for more details.
import 'package:flutter/material.dart';
import 'package:titled_navigation_bar/titled_navigation_bar.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Titled Bar',
home: HomePage(),
);
}
}
class HomePage extends StatefulWidget {
@override
State createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
final List<TitledNavigationBarItem> items = [
TitledNavigationBarItem(title: Text('Home'), icon: Icons.home),
TitledNavigationBarItem(title: Text('Search'), icon: Icons.search),
TitledNavigationBarItem(title: Text('Bag'), icon: Icons.card_travel),
TitledNavigationBarItem(title: Text('Orders'), icon: Icons.shopping_cart),
TitledNavigationBarItem(title: Text('Profile'), icon: Icons.person_outline),
];
bool navBarMode = false;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Titled Bottom Bar"),
),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text("Reversed mode:"),
Switch(
value: navBarMode,
onChanged: (v) {
setState(() => navBarMode = v);
},
),
],
),
),
bottomNavigationBar: TitledBottomNavigationBar(
onTap: (index) => print("Selected Index: $index"),
reverse: navBarMode,
curve: Curves.easeInBack,
items: items,
activeColor: Colors.red,
inactiveColor: Colors.blueGrey,
),
);
}
}