Giter Site home page Giter Site logo

haptome / dot_navigation_bar Goto Github PK

View Code? Open in Web Editor NEW
45.0 2.0 16.0 2.09 MB

A bottom navigation bar that you can customize with the options you need, without any limits. You can also customize the appearance of the navigation bar with simple smooth animations, providing a nice and clean UI/UX.

Home Page: https://github.com/haptome/dot_navigation_bar

License: MIT License

Dart 86.89% Kotlin 0.79% Swift 2.56% Objective-C 0.24% HTML 9.52%
flutter flutter-package navigationbar floating-navigation-bar dart

dot_navigation_bar's Introduction

Hello there , I'm Haptome! ๐Ÿ‘‹



  • ๐Ÿ”ญ Iโ€™m currently working on Something BIG.
  • ๐ŸŒฑ Iโ€™m currently learning more about { ๐Ÿค” } .
  • ๐Ÿ’ฌ Ask me about Flutter or any tech-related stuff.
  • ๐Ÿ“ซ How to reach me: Linkendin , Email
  • ๐Ÿ˜„ I'm almost spend 12+ hours working on private repos so i might be let to replay.

Languages and Tools:

dart flutter android android android firebase sketch git
git








Show some โค๏ธ by starring some of the repositories!

dot_navigation_bar's People

Contributors

bilalraad avatar buraktabn avatar haptome avatar iamvivekkaushik avatar zlhz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dot_navigation_bar's Issues

Navigation with named routes

Hey there, lovely Navbar. I am experiencing an issue I can't seem to fix.

Navigation with named routes causes the Navbar to disappear on the next page. For example if I do a
Navigator.pushNamed(context, AppRouter.pageName)

Code being referenced in AppRouter

case AppRouter.pageName: return MaterialPageRoute( settings: const RouteSettings(name: AppRouter.pageName), builder: (context) => const PageName());

Could you assist please

The DotNavigationBar overflowed by 43 pixels on the bottom.

I tried to insert the DotNavigationBar for the first time and immediately the error appears: A RenderFlex overflowed by 43 pixels on the bottom.

I tried to fix it but i can't, can someone help me?

My code:

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


class MainPage extends StatefulWidget {
  const MainPage({Key? key}) : super(key: key);

  @override
  State<MainPage> createState() => _MainPageState();
}

class _MainPageState extends State<MainPage> {
  
  int selectedIndex = 0;
  late PageController pageController;

  void _handleIndexChanged(int index) {
    setState(() {
      selectedIndex = index;
    });
  }

  void initState() {
    super.initState();
    pageController = PageController(initialPage: selectedIndex);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.purple,
          title: const Text('Test'),
        ),
        body: Container(),
        extendBody: false,
        bottomNavigationBar: DotNavigationBar(
            margin: EdgeInsets.only(left: 10, right: 10),
            currentIndex: selectedIndex,
            dotIndicatorColor: Colors.white,
            unselectedItemColor: Colors.grey[300],
            onTap: _handleIndexChanged,
            items: [
              DotNavigationBarItem(
                icon: Icon(Icons.home),
                selectedColor: Colors.purple,
              ),
              DotNavigationBarItem(
                  icon: Icon(Icons.favorite_border),
                  selectedColor: Colors.pink
              ),
              DotNavigationBarItem(
                icon: Icon(Icons.search),
                selectedColor: Colors.orange,
              ),
              DotNavigationBarItem(
                icon: Icon(Icons.person),
                selectedColor: Colors.teal,
              ),
            ]
        )
    );
  }
}

Not floating in flutter 3.3

I'm using your package for flutter 3.3 with dart 2.18.1, and it has a background above of all screens, then it is not float, actually.
Please update your beautiful package.
Best regards.

RangeError (index): Invalid value: Not in inclusive range 0..3: 4

Hello,

I am trying to use the DotNavigationbar plugin in flutter,

all is working but since i added a 5th item or basically a 4th index, it shows the error at the top
(RangeError (index): Invalid value: Not in inclusive range 0..3: 4)

This is the Screenshot of the item i added, working with 4 items only is okay, but i needed a 5th one,

image

Thanks

opacity property

Can you add opacity property to your package? In some situations I want to disable navigation bar .
Thank you in advance....

Overflow Error with DotNavigationBar in BottomAppBar

Description

I encountered an overflow error when using the DotNavigationBar within a BottomAppBar in my Flutter application. The error occurred due to excessive padding and margin values causing the content to exceed the available space.

Steps to Reproduce

Use DotNavigationBar within a BottomAppBar.

Set the following properties:

  • dotIndicatorColor
  • marginR
  • paddingR
  • itemPadding

Error Message :

A RenderFlex overflowed by 40 pixels on the bottom.

Solution

The issue was resolved by adjusting the default padding and margin values. Here are the working configuration values:

marginR: const EdgeInsets.only(bottom: 0, right: 40, left: 40)
paddingR: const EdgeInsets.only(bottom: 1, top: 5)
itemPadding: const EdgeInsets.symmetric(horizontal: 25, vertical: 10)

Example :
return Scaffold( extendBody: true, body: activePage(_selectedPageIndex), bottomNavigationBar: Padding( padding: const EdgeInsets.only(bottom: 50), child: DotNavigationBar( dotIndicatorColor: Colors.transparent, marginR: const EdgeInsets.only(bottom: 0, right: 40, left: 40), paddingR: const EdgeInsets.only(bottom: 1, top: 5), itemPadding: const EdgeInsets.symmetric(horizontal: 25, vertical: 10), items: [ DotNavigationBarItem(icon: Icon(Icons.category)), DotNavigationBarItem(icon: Icon(Icons.add)), DotNavigationBarItem(icon: Icon(Icons.filter_list_alt)), ], currentIndex: _selectedPageIndex, onTap: _selectPage, ), ), );

Visual Reference
Here is an image of how the navigation bar appears with the adjusted values:

WhatsApp Image 2024-06-05 at 17 06 48_9b259c90

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.