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

floating_bottom_bar 封面
插件详情v0.0.4

floating_bottom_bar

此包为位于中心和底部标签按钮的浮动操作按钮提供滑动动画。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1410
喜欢数
115
Pub 分数
150

安装插件

flutter pub add floating_bottom_bar

插件介绍

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

floating_bottom_bar 包通过为位于中心且底部标签按钮的浮动操作按钮添加流畅的滑动动画来增强用户界面。专为 Flutter 应用设计,它可与底部导航栏无缝集成,为 Android、iOS、Web、macOS、Windows 和 Linux 平台提供引人入胜且互动性强的体验。该包支持可自定义的过渡效果和响应式布局,非常适合注重直观导航和视觉吸引力的现代应用设计。

适合场景

  • 增强移动应用导航
  • 创建动画浮动操作按钮
  • 提高仪表板中的用户参与度
  • 设计响应式底部导航
  • 向网页应用添加动态UI元素
  • 支持多平台应用开发

主要特点

  • FAB 的平滑滑动动画
  • 居中对齐的浮动操作按钮
  • 底部标签集成
  • 跨平台兼容性
  • 可自定义的过渡效果
  • 响应式布局支持

适合对象

  • Flutter 开发者寻找动画 UI
  • 需要直观底部导航的应用程序
  • 设计师专注于交互组件
  • 多平台应用程序构建工具
  • 移动和网页应用用户体验优化

使用建议

  • 需要 Flutter SDK 2.0 或更高版本
  • 可能会影响低端设备的性能
  • 超出动画之外的自定义功能有限
  • 最适合简单的导航模式
  • 依赖于平台特定的渲染
  • 不适合复杂的导航层次结构

原始 README

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

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 sales@mindinventory.com And do let us know if you have any questions or suggestion regarding our work.

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。