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

stage_navigation_bar 封面
插件详情v0.1.0

stage_navigation_bar

一个用于精美导航栏的 Flutter 包,选择项目时带有动画效果。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
10
喜欢数
9
Pub 分数
150

安装插件

flutter pub add stage_navigation_bar

插件介绍

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

一个 Flutter 包,提供美观的底部导航栏,并在切换项目时具有平滑的动画效果。它通过在导航过程中提供动态视觉反馈来增强用户体验,非常适合需要吸引人且现代界面元素的应用程序。该包支持 Android、iOS、Web、macOS、Windows 和 Linux 多个平台,确保在各种设备上行为一致。通过 pub add 进行最少的设置,开发者可以快速将视觉丰富的导航解决方案集成到项目中。

适合场景

  • 移动应用导航
  • Web 应用程序接口
  • 跨平台桌面应用
  • 交互式UI原型
  • 现代应用程序设计实现

主要特点

  • 动画项目选择
  • 平滑过渡效果
  • 多平台支持
  • 与 pub 的轻松集成
  • 可自定义外观
  • 响应式设计

适合对象

  • 寻求动画导航栏的开发者
  • 注重设计的 Flutter 应用程序
  • 针对多个平台的应用
  • UI/UX增强项目
  • 初学者到中级 Flutter 用户

使用建议

  • 可能需要在旧设备上进行性能测试
  • 超出基本样式的定制功能有限
  • 依赖外部动画库
  • 不适合简单的静态导航需求
  • 与其他导航包可能存在冲突

原始 README

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

Static Badge Static Badge Static Badge

A beautiful navigation bar with animation when select item.

Top To Bottom

Table of contents

  1. Installing
  2. How To Use
  3. Showcase
  4. Example Project
  5. Contributors

🖥 Installing

Add Dependency
dependencies:
  stage_navigation_bar: ^0.1.0 #latest version
Import Package
import 'package:stage_navigation_bar/stage_navigation_bar.dart';

ℹ️ How To Use

Place your StageNavigationBar to the bottomNavigationBar slot of a Scaffold. Or in the bottom of your main page view.

Code
class StageNavigationBarExample extends StatefulWidget {
  const StageNavigationBarExample({super.key});

  @override
  State<StageNavigationBarExample> createState() =>
      _StageNavigationBarExampleState();
}

class _StageNavigationBarExampleState extends State<StageNavigationBarExample> {
  /// Your initial page
  int _selectedIndex = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      bottomNavigationBar: StageNavigationBar(
        items: const [
          Icon(Icons.home_filled, color: Colors.white),
          Icon(Icons.favorite, color: Colors.white),
          Icon(Icons.search, color: Colors.white),
          Icon(Icons.person, color: Colors.white),
        ],
        selectedIndex: _selectedIndex,
        indicatorColor: Colors.amber,
        onTap: (int index) {
          setState(() {
            _selectedIndex = index;
          });
        },
      ),
    );
  }
}
Properties
  • animationDirection: Define the animation move shape when tap.
  • alignment: Alignment of the items.
  • barHeight: StageNavigationBar height.
  • barWidth: StageNavigationBar width.
  • indicatorHeight: Indicator line height.
  • itemPadding: Each item padding.
  • duration: Indicator animation Transition duration.
  • selectedIndex*: Current selected index.
  • indicatorColor*: Color of the indicator and the gradient.
  • onTap*: On item tap.
  • barPadding?: StageNavigationBar internal padding.
  • barMargin?: StageNavigationBar external padding.
  • decoration?: StageNavigationBar box decoration.
  • selectedIndicatorBorderRadius?: Selected item indicator border radius.
  • unselectedIndicatorBorderRadius?: Unselected item indicator border radius.
  • items!: StageNavigationBar items, List of widget.
  • itemsCount!: Items count for itemBuilder callback.
  • itemBuilder!: Callback will be called with indices greater than or equal to zero and less than itemsCount.
Default values
  • animationDirection = IndicatorAnimationDirection.topToBottom,
  • alignment = Alignment.center,
  • barHeight = 60,
  • barWidth = double.infinity
  • indicatorHeight = 5,
  • itemPadding = const EdgeInsets.all(0),
  • duration = const Duration(milliseconds: 200),
  • selectedIndicatorBorderRadius: default value depends on 'animationDirection' value,
  • unselectedIndicatorBorderRadius: default value depends on 'animationDirection' value,
IndicatorAnimationDirection Values
IndicatorAnimationDirection.top
IndicatorAnimationDirection.topToBottom
IndicatorAnimationDirection.centerToTop
IndicatorAnimationDirection.centerToBottom
IndicatorAnimationDirection.bottom
IndicatorAnimationDirection.bottomToTop
Event
onTap: (index){

}

🕹 Showcase

IndicatorAnimationDirection
animationDirection: IndicatorAnimationDirection.top

Top


animationDirection: IndicatorAnimationDirection.topToBottom

Top To Bottom


animationDirection: IndicatorAnimationDirection.centerToTop

Center To Top


animationDirection: IndicatorAnimationDirection.centerToBottom

Center To Bottom


animationDirection: IndicatorAnimationDirection.bottom

Bottom


animationDirection: IndicatorAnimationDirection.bottomToTop

Bottom To Top

📱 Example Project

Pub Example

Github Example Project

👨🏻‍💻 Contributors

Mohammad Alamoudi @mu7mmd

所属分类

源码仓库

使用此插件的项目

暂无相关数据。