搜索插件、代码仓与 APP 分类

dot_navigation_bar 封面
插件详情v1.0.2

dot_navigation_bar

简单的平滑动画,提供美观简洁的 UI/UX 底部导航栏。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1200
喜欢数
436
Pub 分数
150

安装插件

flutter pub add dot_navigation_bar

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 包,提供简洁、带动画效果的底部导航栏,具有平滑的过渡效果和清爽的用户界面/用户体验设计。它通过微妙的点状指示器增强应用导航,为传统标签栏提供优雅的替代方案。适用于希望在多个平台上采用现代、极简导航模式的应用。该包支持所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux,确保一致的用户体验。通过 pub add 进行最少设置,即可无缝集成到现有项目中。

适合场景

  • 移动应用导航
  • Web 应用程序接口
  • 跨平台桌面应用
  • 极简主义用户界面设计
  • 通过动画增强用户体验

主要特点

  • 流畅的动画
  • 干净的点状设计
  • 跨平台支持
  • 轻松集成
  • 可自定义外观
  • 响应式布局

适合对象

  • 注重UI/UX的开发者
  • 具有简单导航需求的应用程序
  • 需要轻量级组件的项目
  • 注重设计的应用程序
  • 跨平台 Flutter 应用

使用建议

  • 超出基本样式的定制功能有限
  • 可能不适合复杂的导航结构
  • 适用于拥有3-5个标签页的应用程序
  • 不太适合高度交互的导航栏
  • 需要仔细规划色彩对比

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Dot Navigation Bar


undefined undefined
undefined undefined undefined undefined undefined
undefined undefined

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.

style1 Example flutter project


NEW


  • Round nav bar
  • Example file
  • Floating nav bar
  • shadow to Floating nav bar

Getting Started

To install, add it to your pubspec.yaml file:

dependencies:
    dot_navigation_bar:

import 'package:dot_navigation_bar/dot_navigation_bar.dart';

How to use it

call DotNavigationBar's constructor:

If you want to show body behind the navbar, it should be true

      extendBody: true,

if you are not intersted inmaking round nav bar with show body behind the navbar you have to make that

      extendBody: false,
Widget build(BuildContext context) {
  return Scaffold(
    body: Center(),
    extendBody: true,//<------like this 
    bottomNavigationBar:  DotNavigationBar(
          currentIndex: _SelectedTab.values.indexOf(_selectedTab),
          onTap: _handleIndexChanged,
          dotIndicatorColor: Colors.black,
          // enableFloatingNavBar: false
          items: [
            
            
          ],
        ),
  );
}

basic implementation

   Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        child: Image.asset("assets/IMG.png"),
      ),
      bottomNavigationBar:  DotNavigationBar(
          currentIndex: _SelectedTab.values.indexOf(_selectedTab),
          onTap: _handleIndexChanged,
          // dotIndicatorColor: Colors.black,
          items: [
            /// Home
            DotNavigationBarItem(
              icon: Icon(Icons.home),
              selectedColor: Colors.purple,
            ),

            /// Likes
            DotNavigationBarItem(
              icon: Icon(Icons.favorite_border),
              selectedColor: Colors.pink,
            ),

            /// Search
            DotNavigationBarItem(
              icon: Icon(Icons.search),
              selectedColor: Colors.orange,
            ),

            /// Profile
            DotNavigationBarItem(
              icon: Icon(Icons.person),
              selectedColor: Colors.teal,
            ),
            
          ],
        ),
    );
  }

The constructor has 18 attributes related to the Widget:

  • items: A list of tabs to display, ie Home, Profile,Cart, etc
  • currentIndex: The tab to display.
  • onTap:Returns the index of the tab that was tapped.
  • selectedItemColor:The color of the icon and text when the item is selected.
  • unselectedItemColor: The color of the icon and text when the item is not selected.
  • margin:A convenience field for the margin surrounding the entire widget.
  • itemPadding:The padding of each item.
  • duration: The transition duration.
  • curve: The transition curve.
  • dotIndicatorColor:The color of the Dot indicator.
  • marginR:margin for the bar to give some radius .
  • paddingR:padding for the bar to give some radius.
  • borderRadius:border radius for nav bar.
  • backgroundColor:bgd colors for the nav bar.
  • boxShadow: floating nav bar shadow ,it takes List of BoxShadow
  • enableFloatingNavBar: make Floating nav bar enabled.
  • enablePaddingAnimation: enable the animation on item during item change.
  • splashColor: Color of the item's Splash Color. To disable, use Colors.transparent.

default values

marginR = const EdgeInsets.symmetric(horizontal: 50, vertical: 20),

paddingR = const EdgeInsets.only(bottom: 5, top: 10),

borderRadius = 30,

backgroundColor = Colors.white, enableFloatingNavBar=true, enablePaddingAnimation=true

Contributors

@iamvivekkaushik @buraktabn @Zheng Xiangrui

所属分类

源码仓库

使用此插件的项目