animated_bottom_bar 0.0.1 copy "animated_bottom_bar: ^0.0.1" to clipboard
animated_bottom_bar: ^0.0.1 copied to clipboard

outdated

A Nice Animated Bottom Bar

Installation #

  1. Add the latest version of package to pubspec.yaml
dependencies:
  animated_bottom_bar:
  1. Import the package
import 'package:animated_bottom_bar/animated_bottom_bar.dart';
class Test extends StatefulWidget {
  const Test({Key? key}) : super(key: key);

  @override
  State<Test> createState() => _TestState();
}

class _TestState extends State<Test> {

  int select = 0;

  Color active = Colors.blue;
  Color inactive = Colors.black;

  @override
  Widget build(BuildContext context) {
    double mediaQH = MediaQuery.of(context).size.height;
    double mediaQW = MediaQuery.of(context).size.width;
    return Scaffold(
      body: Container(
        height: mediaQH,
        width: mediaQW,
        color: Colors.white.withOpacity(0.9),
        child: AnimatedBottomBar(

          width: mediaQW,

          height: mediaQH*0.1,

          selectedIndex: select,

          items: [

            AnimatedBarItem(
              icon: Icon(Icons.home),
            ),

            AnimatedBarItem(
              icon: Icon(Icons.dashboard),
            ),

            AnimatedBarItem(
              icon: Icon(Icons.safety_check),
            ),

            AnimatedBarItem(
              icon: Icon(Icons.person),
            ),

          ],
          onItemSelected: (_){
            setState((){
              select = _;
            });
            print(select);
          },
        ),
      ),
    );
  }
}
7
likes
0
pub points
50%
popularity

Publisher

unverified uploader

A Nice Animated Bottom Bar

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on animated_bottom_bar