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

arc_sidebar 封面
插件详情v0.0.4

arc_sidebar

适用于 Flutter 的侧边栏/抽屉

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
60
喜欢数
14
Pub 分数
145

安装插件

flutter pub add arc_sidebar

插件介绍

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

ArcSidebar 是一个可自定义的侧边栏或抽屉组件,专为 Flutter 应用程序设计,采用现代弧形设计以增强导航体验。它支持 Android、iOS、Web、macOS、Windows 和 Linux 多个平台。该包提供流畅的动画效果、响应式布局,并可通过简单的 pub add 命令轻松集成。适用于需要直观导航且具有独特视觉风格的应用程序,为开发者提供了样式和行为上的灵活性。基于性能和可用性设计,ArcSidebar 简化了在各种设备类型上实现优雅侧边导航的流程。

适合场景

  • 移动和桌面应用程序导航
  • Web 应用侧边栏
  • 可定制的抽屉界面
  • 跨平台 UI 一致性
  • 采用弧形设计,提升用户体验

主要特点

  • 弧形设计
  • 跨平台支持
  • 流畅的动画
  • 可自定义外观
  • 响应式布局
  • 通过 pub 轻松集成

适合对象

  • 寻求独特抽屉设计的开发者
  • 需要跨平台一致导航的应用
  • 强调现代用户界面美学的项目
  • 优先考虑快速UI开发的团队
  • 注重设计的 Flutter 应用程序

使用建议

  • 可能需要额外的样式才能实现复杂布局
  • 除了基本用法外,文档有限
  • 大量内容可能带来的性能影响
  • 不太适合极简设计
  • 依赖外部依赖项以实现完整功能

原始 README

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

arc_sidebar

by: Eliezer António

Imagem 1 Gif Exemplo

Installation

Add arc_sidebar: ^0.0.4 to your pubspec.yaml dependencies. And import it:

import 'package:arc_sidebar/arc_sidebar.dart';

How to use

 ArcSideBar(
            body: [
              SideBarItem(
                icon: Icons.play_arrow_outlined,
                title: 'Exhibition Screen',
                onTap: (){

                },
              ),
              SideBarItem(
                title: 'Popular Screen',
                icon: Icons.movie_outlined,
               onTap: (){
                  
                },
              ),
              SideBarItem(
                title: 'Briefly Screen',
                icon: Icons.card_giftcard,
               onTap: (){
                  
                },
              ),
            ],
      
          );
All SliderItem parameters

  Key? key,
  IconData? icon,
  TextStyle? style,
  Color? iconColor,
  String title,
  void Function()? onTap,
  

General Example

Preview


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

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {
  int _currentIndex = 0;
  final List<Widget> _currentScreen = [
    Container(color: Colors.red, width: 500, height: 1000),
    Container(color: Colors.purpleAccent, width: 500, height: 1000),
    Container(color: Colors.orange, width: 500, height: 1000),
    Container(color: Colors.greenAccent, width: 500, height: 1000),
  ];
  void onIconPressed(int index) async {
       if (_currentIndex == index) return; //* Prevent reconstruction of the current screen 
    setState(() {
      _currentIndex = index;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Stack(
        children: [
          _currentScreen[_currentIndex],
          ArcSideBar(
            background: Colors.white,
            header: Center(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  SizedBox(height: 50),
                  Icon(
                    Icons.flutter_dash,
                    size: 100,
                    color: Colors.blueAccent,
                  ),
                ],
              ),
            ),
            body: [
              SideBarItem(
                icon: Icons.play_arrow_outlined,
                title: 'Exhibition Screen',
                onTap: () => onIconPressed(0),
              ),
              SideBarItem(
                title: 'Popular Screen',
                icon: Icons.movie_outlined,
                onTap: () => onIconPressed(1),
              ),
              SideBarItem(
                title: 'Briefly Screen',
                icon: Icons.card_giftcard,
                onTap: () => onIconPressed(2),
              ),
            ],
            footer: Column(
              children: [
                ListTile(
                  title: Text("Dark Mode", style: TextStyle(fontWeight: FontWeight.w300, fontSize: 17)),
                  leading: Icon(Icons.lightbulb_outline, size: 30),
                  trailing: Switch.adaptive(
                    value: false,
                    onChanged: (value) {},
                  ),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}


🤝 Contributing to ArcSideBar
  1. Fork the Repository: Create your copy.

  2. Create a Branch:

    git checkout -b my-feature-branch
    
  3. Make Changes: Implement your feature or fix.

  4. Commit Changes:

    git commit -m "Add a new feature"
    
  5. Push to Your Fork:

    git push origin my-feature-branch
    
  6. Create a Pull Request: Submit your changes for review.

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。