搜索分类、插件与代码仓

responsive_navigation_bar 封面
插件详情v6.2.1

responsive_navigation_bar

一个响应式的底部导航栏。非常适合初学者。欢迎贡献。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
765
喜欢数
83
Pub 分数
160

安装插件

flutter pub add responsive_navigation_bar

插件介绍

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

一个对初学者友好的 Flutter 包,提供响应式底部导航栏,可在 Android、iOS、Web、macOS、Windows 和 Linux 上自适应。它会根据屏幕尺寸和方向自动调整布局,确保所有设备上的最佳用户体验。该包轻量级,易于集成,并鼓励社区贡献。非常适合需要在多个平台上实现一致导航且配置最少的应用程序。

适合场景

  • 跨平台移动和网页应用
  • 适用于不同屏幕尺寸的自适应用户界面
  • 小型到中型应用中的简单导航
  • 使用响应式布局进行原型设计
  • 针对多个操作系统的应用程序

主要特点

  • 自动适应屏幕尺寸
  • 支持所有主要平台
  • 所需设置最少
  • 可自定义外观
  • 开源且由社区驱动

适合对象

  • Flutter 初学者
  • 跨平台应用程序开发者
  • 需要响应式导航的项目
  • 设计师原型设计用户界面
  • 导航复杂度有限的应用程序

使用建议

  • 超出基本样式的定制功能有限
  • 可能需要额外的逻辑来处理复杂的导航模式
  • 不太适合高度动态或嵌套的导航

原始 README

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

Getting Started

Installation

Example Code

Features

  • Very easy to set up, beginner friendly

  • Everything is documented + you will be asked to add required values - the rest is optional (with sound null safety)

  • By default, fontSize, iconSize and padding are responsive (change size with screen size)

  • Set iconSize to control icon size independently (defaults to fontSize if not specified)

  • Optional: Beautiful gradient (backgroundGradient) for navigation bar and/or buttons (or solid colors)

  • Optional: Colored borders (border) for navigation bar and/or buttons

  • Optional: Change the opacity (backgroundOpacity) of the menu bar

  • Optional: Blurred background (backgroundBlur) from the top of the navigation bar to the bottom of the screen

  • Optional: Separate border radius controls (borderRadius, buttonBorderRadius)

  • Optional: Control button spacing (buttonSpacing)

  • By default shows text on selected button, optionally show on inactive buttons too (showInactiveButtonText)

  • Only StatelessWidgets

  • How to make the bottomNavigationBar float above the Scaffold's body:

Scaffold(
  extendBody: true,
  body: SafeArea(bottom: false, ...),
  bottomNavigationBar: ...
  ...
)
  • Colors in the example GIFs below:
backgroundColor:
    Theme.of(context).brightness == Brightness.dark
        ? const Color(0xff3c3c3c)
        : const Color(0xffbebebe),
inactiveIconColor:
    Theme.of(context).brightness == Brightness.dark
        ? const Color(0xffaaaaaa)
        : const Color(0xff969696),

ResponsiveNavigationBar in Action

With animation

Screenrecording Screenrecording
Screenrecording Screenrecording

Without animation

Screenrecording Screenrecording
Screenrecording Screenrecording

Todo

  • Add feature requests
  • Merge your pull requests

所属分类

源码仓库

使用此插件的项目

暂无相关数据。