anim_nav_bar 0.0.2 copy "anim_nav_bar: ^0.0.2" to clipboard
anim_nav_bar: ^0.0.2 copied to clipboard

A Flutter package which give a animated nav bar with lots of customisation options.

example/main.dart

import 'package:anim_nav_bar/anim_nav_bar.dart';
import 'package:flutter/material.dart';

class AnimatedNavExample extends StatelessWidget {
  ///For each icon, you need to create a labeledGlobalKey and pass it to the global key parameter as list,
  ///Make sure, the global key is in same order as your icons
  final LabeledGlobalKey arrowForwardIos =
      LabeledGlobalKey("arrow_forward_ios");
  final LabeledGlobalKey arrowBackIos = LabeledGlobalKey("arrow_back_ios");
  final LabeledGlobalKey arrowForwardOutline =
      LabeledGlobalKey("arrow_forward_ios_outline");
  final LabeledGlobalKey arrowBackOutline =
      LabeledGlobalKey("arrow_back_ios_outline");

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: AnimNavBar(
          /// should be in same order as your icons
          globalKey: [
            arrowForwardIos,
            arrowBackIos,
            arrowBackOutline,
            arrowForwardOutline
          ],
          context: context,
          height: 50,
          /// should be in same order as your global key
          icons: [
            Icons.arrow_forward_ios,
            Icons.arrow_back_ios,
            Icons.arrow_back_ios_outlined,
            Icons.arrow_forward_ios_outlined,
          ],
          onChanged: (int) {
            print(int);
          },
        ),
      ),
    );
  }
}
15
likes
40
pub points
0%
popularity

Publisher

verified publisherdevtools.wtf

A Flutter package which give a animated nav bar with lots of customisation options.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on anim_nav_bar