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

circular_bottom_navigation 封面
插件详情v2.4.0

circular_bottom_navigation

圆形底部导航(或可能是标签栏)

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
592
喜欢数
223
Pub 分数
130

安装插件

flutter pub add circular_bottom_navigation

插件介绍

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

一个用于 Flutter 的圆形底部导航小部件,提供现代且视觉上吸引人的传统标签栏替代方案。它支持流畅的动画以及可自定义的图标、标签和颜色。专为 Android、iOS、Web、macOS、Windows 和 Linux 等多个平台设计,确保一致的用户体验。该包轻量且易于集成,非常适合希望采用独特导航布局而又不牺牲功能性的应用程序。

适合场景

  • 移动应用导航
  • Web 应用程序接口
  • 跨平台UI设计
  • 现代应用程序美学
  • 自定义标签栏实现

主要特点

  • 圆形布局设计
  • 平滑的动画过渡
  • 可自定义图标和标签
  • 多平台支持
  • 与 Flutter 的轻松集成
  • 可配置的颜色方案

适合对象

  • 寻求独特导航模式的开发者
  • 屏幕空间有限的应用程序
  • 注重设计的应用程序
  • 跨平台项目
  • UI/UX实验

使用建议

  • 可能需要额外的样式以确保可访问性
  • 仅限圆形布局(非线性)
  • 自定义的潜在学习曲线
  • 不适合复杂的导航层次结构
  • 依赖外部 GitHub 仓库以获取更新

原始 README

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

Circular Bottom Navigation (or maybe a tab bar).

Awesome Flutter

pub package APK

This is implementation of an artwork in Uplabs

Let's get started

1 - Install and import

In your Dart code, you can use:
import 'package:circular_bottom_navigation/circular_bottom_navigation.dart';
import 'package:circular_bottom_navigation/tab_item.dart';

2 - CheatSheet

3 - Use it like a charm

Make your TabItems
List<TabItem> tabItems = List.of([
    TabItem(Icons.home, "Home", Colors.blue, labelStyle: TextStyle(fontWeight: FontWeight.normal)),
    TabItem(Icons.search, "Search", Colors.orange, labelStyle: TextStyle(color: Colors.red, fontWeight: FontWeight.bold)),
    TabItem(Icons.layers, "Reports", Colors.red, circleStrokeColor: Colors.black),
    TabItem(Icons.notifications, "Notifications", Colors.cyan),
  ]);
Use this widget everywhere you want
CircularBottomNavigation(
      tabItems,
      selectedCallback: (int selectedPos) {
        print("clicked on $selectedPos");
      },
    )

CircularBottomNavigation supports RTL designs, If you wrap your widget in a Directionality widget and set the textDirection property you can customize the direction:

MaterialApp(
  title: 'Circular Bottom Navigation Demo',
  theme: ThemeData(
    primarySwatch: Colors.blue,
  ),
  home: Directionality(
    // use this property to change direction in whole app
    // CircularBottomNavigation will act accordingly
    textDirection: TextDirection.rtl,
    child: MyHomePage(title: 'circular_bottom_navigation'),
  ),
);
How to use CircularBottomNavigationController

With this controller you can read the current tab position, and set a tab position on widget (without needing to rebuild the tree) with the widget built in animation.

Just create a new instance of controller

CircularBottomNavigationController _navigationController =
new CircularBottomNavigationController(selectedPos);

Then pass it in your widget

CircularBottomNavigation(
      tabItems,
      controller: _navigationController,
    );

Now you can write (set new position with animation) and read value from it everywhere you want

// Write a new value
_navigationController.value = 0;

// Read the latest value
int latest = _navigationController.value;

所属分类

源码仓库

使用此插件的项目

暂无相关数据。