bottom_animation 2.0.0 copy "bottom_animation: ^2.0.0" to clipboard
bottom_animation: ^2.0.0 copied to clipboard

Flutter Bottom Navigation Bar | if you want bottom navigation with smooth animation add this package .

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:bottom_animation/bottom_animation.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  var items = <BottomNavItem>[
    BottomNavItem(
        title: 'logo',
        widget: Image.asset(
          'assets/images/logo.png',
          width: 30,
        )),
    BottomNavItem(
        title: 'profile',
        widget: Image.asset('assets/images/profilen.png', width: 30)),
    BottomNavItem(
        title: 'star',
        widget: Image.asset('assets/images/star.png', width: 30)),
  ];

  var cIndex;
  @override
  void initState() {
    cIndex = 0;
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'example',
      theme: ThemeData(
        primarySwatch: Colors.indigo,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: Scaffold(
        backgroundColor: Colors.white,
        bottomNavigationBar: BottomAnimation(
          selectedIndex: cIndex,
          items: items,
          backgroundColor: Color(0xffea8c55),
          onItemSelect: (value) {
            setState(() {
              cIndex = value;
            });
          },
          itemHoverColor: Color(0xfff5dd90),
          itemHoverColorOpacity: .5,
          activeIconColor: Colors.black,
          deActiveIconColor: Colors.black38,
          barRadius: 30,
          textStyle: TextStyle(
            color: Colors.black,
            fontWeight: FontWeight.bold,
            fontSize: 18,
          ),
          itemHoverWidth: 135,
          itemHoverBorderRadius: 30,
        ),
      ),
    );
  }
}
24
likes
140
pub points
52%
popularity

Publisher

unverified uploader

Flutter Bottom Navigation Bar | if you want bottom navigation with smooth animation add this package .

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on bottom_animation