fancy_bottom_navigation 0.1.1 copy "fancy_bottom_navigation: ^0.1.1" to clipboard
fancy_bottom_navigation: ^0.1.1 copied to clipboard

outdated

An animated Bottom Navigation Bar for Flutter apps, icon animates into place, colors are customisable..

example/lib/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.deepOrange,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int currentPage = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Fancy Bottom Navigation"),
      ),
      body: Container(
        decoration: BoxDecoration(color: Colors.white),
        child: Center(
          child: _getPage(currentPage),
        ),
      ),
      bottomNavigationBar: FancyBottomNavigation(
        tabs: [
          TabData(iconData: Icons.home, title: "Home"),
          TabData(iconData: Icons.search, title: "Search"),
          TabData(iconData: Icons.shopping_cart, title: "Basket")
        ],
        onTabChangedListener: (position) {
          setState(() {
            currentPage = position;
          });
        },
      ),
    );
  }

  _getPage(int page) {
    switch (page) {
      case 0:
        return Text("This is the home page");
      case 1:
        return Text("This is the search page");
      default:
        return Text("This is the basket page");
    }
  }
}
229
likes
0
pub points
93%
popularity

Publisher

unverified uploader

An animated Bottom Navigation Bar for Flutter apps, icon animates into place, colors are customisable..

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, vector_math

More

Packages that depend on fancy_bottom_navigation