circle_bottom_navigation 0.1.0 copy "circle_bottom_navigation: ^0.1.0" to clipboard
circle_bottom_navigation: ^0.1.0 copied to clipboard

outdated

An animated Bottom Navigation Bar for Flutter.

example/lib/main.dart

import 'package:circle_bottom_navigation/circle_bottom_navigation.dart';
import 'package:circle_bottom_navigation/widgets/tab_data.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.deepPurple,
      ),
      home: MyHomePage(),
    );
  }
}

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

class _MyHomePageState extends State<MyHomePage> {
  int currentPage = 0;
  GlobalKey bottomNavigationKey = GlobalKey();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Center(
          child: Text(
            'Circle Bottom Navigation Example',
          ),
        ),
      ),
      body: Container(
        decoration: BoxDecoration(
          color: Colors.white,
        ),
        child: Center(
          child: Text(
            'Test Circle Navigation'
          ),
        ),
      ),
      bottomNavigationBar: CircleBottomNavigation(
        circleSize: 35,
        arcHeight: 45,
        arcWidth: 75,
        barHeight: 55,
        initialSelection: currentPage,
        inactiveIconColor: Colors.grey,
        textColor: Colors.black,
        tabs: [
          TabData(
            icon: Icons.home,
            title: "Home",
          ),
          TabData(
            icon: Icons.history,
            title: "History",
          ),
          TabData(
            icon: Icons.search,
            title: "Search",
          ),
          TabData(
            icon: Icons.alarm,
            title: "Alarm",
          ),
        ],
        onTabChangedListener: (index) {
          setState(() {
            currentPage = index;
          });
        },
      ),
    );
  }
}
36
likes
0
pub points
60%
popularity

Publisher

unverified uploader

An animated Bottom Navigation Bar for Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, vector_math

More

Packages that depend on circle_bottom_navigation