animated_nav_sheet 1.1.0 copy "animated_nav_sheet: ^1.1.0" to clipboard
animated_nav_sheet: ^1.1.0 copied to clipboard

Flutter App Create Navigation Nav Animation with Bottom Sheet Very Easy Clean with Stream

Install Package #

animated_nav_sheet: 1.1.0

Animation #

  final _navController = NavController();
///animation forward
  _navController.forward();
  
///animation reverse
_navController.reverse();

Preview #

Usage #

  • Example
class AnimatedNavbarScreen extends StatefulWidget {
  const AnimatedNavbarScreen({super.key});

  @override
  State<AnimatedNavbarScreen> createState() => _AnimatedNavbarScreenState();
}

class _AnimatedNavbarScreenState extends State<AnimatedNavbarScreen> {
  final _navController = NavController();

  @override
  void dispose() {
    _navController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return Scaffold(
      body: AnimationNavSheet(
        color: Colors.primaries[3 % Colors.primaries.length],
        maxHeight: size.height * .5,
        navWidget: GestureDetector(
          onTap: () {
            _navController.forward();
          },
          child: buildContainerMin(),
        ),
        expendedWidget: GestureDetector(
          onTap: () {},
          child: buildContainerMax(),
        ),
        navController: _navController,
        child: Center(
          child: Text(
            "Example Animation Nav Sheet",
            style: Theme.of(context).textTheme.displaySmall,
            textAlign: TextAlign.center,
          ),
        ),
      ),
    );
  }

  Widget buildContainerMax() {
    return SingleChildScrollView(
      child: Column(
        children: [
          ElevatedButton(
              onPressed: () {
                _navController.reverse();
              },
              child: const Text('Open sheet')),
          ElevatedButton(onPressed: () {}, child: const Text('Open sheet')),
          ElevatedButton(onPressed: () {}, child: const Text('Open sheet')),
        ],
      ),
    );
  }

  Row buildContainerMin() {
    return const Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: [
        Icon(
          Icons.home_max,
          color: Colors.white,
        ),
        Icon(
          Icons.people_alt_outlined,
          color: Colors.white,
        ),
        Icon(
          Icons.settings,
          color: Colors.white,
        )
      ],
    );
  }
}

animated_nav_sheet #

4
likes
160
points
36
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter App Create Navigation Nav Animation with Bottom Sheet Very Easy Clean with Stream

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on animated_nav_sheet