Code Monkey home page Code Monkey logo

mauricio-hns / floating_bottom_bar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mindinventory/floating_bottom_bar

0.0 0.0 0.0 3.33 MB

This package will animate a floating action button at the center and icons at the bottomNavigationBar using AnimatedContainer and SlideTransition respectively.

Home Page: https://www.mindinventory.com/flutter-app-development.php

License: MIT License

Ruby 0.46% Objective-C 0.08% Kotlin 0.25% Dart 90.65% Swift 0.81% HTML 7.75%

floating_bottom_bar's Introduction

floating_bottom_bar

This package will animate a floating action button at the center and icons at the bottomNavigationBar using AnimatedContainer and SlideTransition respectively.

Floating Bottom Bar

Floating Bottom Bar

Usage

Example

    bottomNavigationBar: AnimatedBottomNavigationBar(
      barColor: Colors.white,
      controller: FloatingBottomBarController(initialIndex: 1),
      bottomBar: [
        BottomBarItem(
          icon: const Icon(Icons.home, size: example.Dimens.iconNormal),
          iconSelected: const Icon(Icons.home,
              color: example.AppColors.cherryRed,
              size: example.Dimens.iconNormal),
          title: example.Strings.home,
          dotColor: example.AppColors.cherryRed,
          onTap: (value) {
            setState(() {
              index = value;
            });
            log('Home $value');
          },
        ),
        BottomBarItem(
          icon:
              const Icon(Icons.photo, size: example.Dimens.iconNormal),
          iconSelected: const Icon(Icons.photo,
              color: example.AppColors.cherryRed,
              size: example.Dimens.iconNormal),
          title: example.Strings.search,
          dotColor: example.AppColors.cherryRed,
          onTap: (value) {
            setState(() {
              index = value;
            });
            log('Search $value');
          },
        ),
        BottomBarItem(
          icon:
              const Icon(Icons.person, size: example.Dimens.iconNormal),
          iconSelected: const Icon(Icons.person,
              color: example.AppColors.cherryRed,
              size: example.Dimens.iconNormal),
          title: example.Strings.person,
          dotColor: example.AppColors.cherryRed,
          onTap: (value) {
            setState(() {
              index = value;
            });
            log('Profile $value');
          },
        ),
        BottomBarItem(
          icon: const Icon(Icons.settings,
              size: example.Dimens.iconNormal),
          iconSelected: const Icon(Icons.settings,
              color: example.AppColors.cherryRed,
              size: example.Dimens.iconNormal),
          title: example.Strings.settings,
          dotColor: example.AppColors.cherryRed,
          onTap: (value) {
            setState(() {
              index = value;
            });
            log('Settings $value');
          },
        ),
      ],
      bottomBarCenterModel: BottomBarCenterModel(
        centerBackgroundColor: example.AppColors.cherryRed,
        centerIcon: const FloatingCenterButton(
          child: Icon(
            Icons.add,
            color: AppColors.white,
          ),
        ),
        centerIconChild: [
          FloatingCenterButtonChild(
            child: const Icon(
              Icons.home,
              color: AppColors.white,
            ),
            onTap: () => log('Item1'),
          ),
          FloatingCenterButtonChild(
            child: const Icon(
              Icons.access_alarm,
              color: AppColors.white,
            ),
            onTap: () => log('Item2'),
          ),
          FloatingCenterButtonChild(
            child: const Icon(
              Icons.ac_unit_outlined,
              color: AppColors.white,
            ),
            onTap: () => log('Item3'),
          ),
        ],
      ),
    ),

Required parameters

bottomBar:

This property takes List as a parameter which are use to show the icons in the bottomNavigationBar.

bottomBarCenterModel:

BottomBarCenterModel class is model class for bottom menu. It takes icon, iconSelected, title, titleStyle as parameters.

controller:

FloatingBottomBarController is used to give the initial index to the bottom bar to have the pre selected item form the bottom bar.

Guideline for contributors

Contribution towards our repository is always welcome, we request contributors to create a pull request to the develop branch only.

Guideline to report an issue/feature request

It would be great for us if the reporter can share the below things to understand the root cause of the issue.

  • Library version
  • Code snippet
  • Logs if applicable
  • Device specification like (Manufacturer, OS version, etc)
  • Screenshot/video with steps to reproduce the issue

LICENSE!

Animated Segment is MIT-licensed.

Let us know!

We’d be really happy if you send us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding our work.

floating_bottom_bar's People

Contributors

smunshimi avatar anujmi297 avatar deep-mindinventory avatar mi-ghanshyam avatar sahilmind avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.