パッケージ、リポジトリ、アプリカテゴリを検索

animated_sidebar のカバー
パッケージ詳細v1.0.1

animated_sidebar

Flutter用の折りたたみ可能サイドバー・プラグインで、Webおよびデスクトップアプリケーションに最適化されています。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
244
いいね数
42
Pub ポイント
150

パッケージをインストール

flutter pub add animated_sidebar

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Animated Sidebar は、Web およびデスクトップアプリケーション向けに設計された折りたたみ可能なサイドバーを提供する Flutter プラグインです。スムーズなアニメーションと応答性のある動作により、大きなインターフェースでのナビゲーションを向上させます。サイドバーは滑らかなトランジションで展開または収縮でき、プラットフォーム間でのユーザー体験を改善します。パフォーマンスを意識して構築されており、モバイル、Web、デスクトップなど、さまざまな環境向けのアプリにシームレスに統合できます。ダッシュボード、管理パネル、効率的なスペース管理が必要な複雑な UI に最適です。

用途

  • ダッシュボードナビゲーション
  • 管理パネルインターフェース
  • デスクトップアプリケーションのレイアウト
  • Webアプリのサイドバー
  • マルチプラットフォームアプリ

主な機能

  • スムーズな折りたたみアニメーション
  • Webおよびデスクトップ用のレスポンシブデザイン
  • クロスプラットフォーム互換性
  • カスタマイズ可能な外観
  • 既存のFlutterプロジェクトとの簡単な統合

適している対象

  • Web/デスクトップアプリを開発する開発者
  • ナビゲーション効率に注力するUIデザイナー
  • 動的なサイドバー動作を必要とするプロジェクト
  • 複雑なナビゲーション構造を持つアプリ
  • 複数のプラットフォームをターゲットにする Teams

注意事項

  • Webおよびデスクトップの用途に最適
  • モバイル固有の要件に対応するため、追加のスタイリングが必要になる場合があります
  • パフォーマンスはアニメーションの複雑さに依存します
  • 基本的なスタイリングを超えるカスタマイズオプションは限られている
  • モバイル専用アプリ向けに最適化されていません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Animated Sidebar

pub package Libraries.io for GitHub License

A highly customizable and styleable collapsable sidebar plugin for Flutter, optimized for web and desktop applications.

Example

example-ui

Installation

Add the following to your pubspec.yaml file:

dependencies:  
 animated_sidebar: ^1.0.0   

or use the following command:

flutter pub add animated_sidebar  

Add the following import to your dart file:

import 'package:animated_sidebar/animated_sidebar.dart';  

Usage

Sidebar Items

define a list of SidebarItem objects:

import 'package:animated_sidebar/animated_sidebar.dart';  
  
final List<SidebarItem> items = [  
  SidebarItem(icon: Icons.home, text: 'Home'),  
  SidebarItem(icon: Icons.notifications, text: 'Notifications'),  
  SidebarItem(icon: Icons.person, text: 'Management'),  
];  
Child Items

it is also possible to define multiple SidebarChildItem for every SidebarItem.

import 'package:animated_sidebar/animated_sidebar.dart';  
  
final List<SidebarItem> items = [  
  SidebarItem(icon: Icons.home, text: 'Home'),  
  SidebarItem(  
    icon: Icons.person,  
    text: 'Management',  
    children: [  
	  SidebarChildItem(icon: Icons.person, text: 'Users'),  
	  SidebarChildItem(icon: Icons.verified_user, text: 'Roles'),  
    ],  
  ),
];  

The Item Containing the Children is Collapsed and expand only on tap. If the Current selected item is a SidebarChildItem the overlying Item keeps expanded

Default usage of AnimatedSidebar
import 'package:animated_sidebar/animated_sidebar.dart';

@override
Widget build(BuildContext context) {
  return Scaffold(
    backgroundColor: Theme.of(context).scaffoldBackgroundColor,
    body: Row(
      children: [
        AnimatedSidebar(
          expanded: MediaQuery.of(context).size.width > 600,
          items: items,
          selectedIndex: 0,
          onItemSelected: (index) => print(index),
          headerIcon: Icons.ac_unit_sharp,
          headerIconColor: Colors.amberAccent,
          headerText: 'Example',
        ),
        Center(
          child: Text(
            'Page: $activeTab',
            style: Theme.of(context).textTheme.headline3,
          ),
        ),
      ],
    ),
  );
}
Use the AnimatedSidebar widget and handle state external :
import 'package:animated_sidebar/animated_sidebar.dart';

int activeTab = 0;

@override
Widget build(BuildContext context) {
  return Scaffold(
    backgroundColor: Theme.of(context).scaffoldBackgroundColor,
    body: Row(
      children: [
        AnimatedSidebar(
          expanded: MediaQuery.of(context).size.width > 600,
          items: items,
          selectedIndex: activeTab,
          autoSelectedIndex: false, // must be false if you want to handle state external
          onItemSelected: (index) =>
              setState(() => activeTab = index),
          headerIcon: Icons.ac_unit_sharp,
          headerIconColor: Colors.amberAccent,
          headerText: 'Example',
        ),
        Center(
          child: Text(
            'Page: $activeTab',
            style: Theme.of(context).textTheme.headline3,
          ),
        ),
      ],
    ),
  );
}

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。