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

rolling_bottom_bar 封面
插件详情v0.2.2

rolling_bottom_bar

一个用于显示动态底部栏并以球形作为指示器的包。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
162
喜欢数
38
Pub 分数
140

安装插件

flutter pub add rolling_bottom_bar

插件介绍

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

一个 Flutter 包,实现了一个动态底部导航栏,带有滚动球形指示器。球体在栏中平滑动画移动以指示当前选中的标签,提供现代且互动的用户体验。支持 Android、iOS、Web、macOS、Windows 和 Linux 等多个平台。该包轻量且可定制,允许开发者调整颜色、大小和动画速度。非常适合希望拥有视觉吸引力且过渡流畅的导航界面的应用。

适合场景

  • 移动应用导航
  • Web 应用程序接口
  • 跨平台UI设计
  • 交互式标签切换
  • 现代应用程序美学

主要特点

  • 滚动球指示器
  • 流畅的动画
  • 跨平台支持
  • 可自定义外观
  • 轻量级实现

适合对象

  • 寻求现代导航的开发者
  • 带有多个标签页的应用
  • 注重设计的 Flutter 项目
  • 交互式 UI 组件
  • 跨平台应用程序

使用建议

  • 可能需要在低端设备上进行性能调优
  • 复杂动画的自定义功能有限
  • 不太适合简单的静态导航
  • 需要理解Flutter动画原理
  • 最适合具有3-5个标签页的应用程序

原始 README

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

Rolling Bottom Bar

This packages, based on this demo by Kabo showing a bottom bar with a dynamic ball indicator.

New Features 💥
  • Capability to avoid the bottom bar shadow by flat property on false
  • Setting active color by each item define on color property of RollingBottomBarItem widget

Demo

Instalation

Include rolling_bottom_bar in your pubspec.yaml file:

dependencies:
  flutter:
    sdk: flutter
  rolling_bottom_bar: version

Usage

To use this package, just import it into your file, build your bottom bar together with a PageView and enjoy it.

import 'package:rolling_bottom_bar/rolling_bottom_bar.dart';
import 'package:rolling_bottom_bar/rolling_bottom_bar_item.dart';

...

@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Rolling Bottom Bar'),
      ),
      body: PageView(
        controller: _controller,
        children: <Widget>[
          ColoredBox(color: Colors.blueGrey.shade100),
          ColoredBox(color: Colors.redAccent),
          ColoredBox(color: Colors.greenAccent),
          ColoredBox(color: Colors.yellowAccent),
        ],
      ),
      extendBody: true,
      bottomNavigationBar: RollingBottomBar(
        controller: _controller,
        items: [
          RollingBottomBarItem(Icons.home, label: 'Page 1'),
          RollingBottomBarItem(Icons.star, label: 'Page 2'),
          RollingBottomBarItem(Icons.person, label: 'Page 3'),
          RollingBottomBarItem(Icons.access_alarm, label: 'Page 4'),
        ],
        activeItemColor: Colors.green.shade700,
        enableIconRotation: true,
        onTap: (index) {
          _controller.animateToPage(
            index,
            duration: const Duration(milliseconds: 400),
            curve: Curves.easeOut,
          );
        },
      ),
    );
  }
}

...

Options for Rolling Bottom Bar Item use

Name Description Required Default
iconData IconData to use as item icon True
label String to use as label item False
activeColor Color to use when icon is active. Only works with useActiveColorByDefault property of RollingBottomBarItem set on true False Colors.green

Options for Rolling Bottom Bar use

Name Description Required Default
controller PageView controller to use to move between pages True
items List of RollingBottomBarItem to render into bottom bar True
onTap Function triggered when an item is tapped True
color Color value to use as background False Colors.white
itemColor Color value to use with inactive items False Colors.grey[700]
activeItemColor Color value to use with active items False Colors.green
enableIconRotation Boolean value to indicate when rotation effect is triggered False false
flat Boolean value to indicate if the bottom bar has shadow or not False false
useActiveColorByDefault Boolean value to indicate when to use individual active color for each child False true

所属分类

源码仓库

使用此插件的项目

暂无相关数据。