clickable_animated_bottom_nav_bar 0.0.4
clickable_animated_bottom_nav_bar: ^0.0.4 copied to clipboard
A customizable animated bottom navigation bar for Flutter.
import 'package:clickable_animated_bottom_nav_bar/animated_bottom_nav_bar.dart';
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
int _selectedIndex = 0;
final List<IconData> icons = [
Icons.home,
Icons.favorite,
Icons.person,
];
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Text('Current Tab: $_selectedIndex'),
),
bottomNavigationBar: AnimatedBottomNavBar(
icons: icons,
currentIndex: _selectedIndex,
onTap: (index) => setState(() => _selectedIndex = index),
),
),
);
}
}