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

expandable_menu のカバー
パッケージ詳細v0.0.5

expandable_menu

拡張可能なメニューは、無限の水平アイテムリストを備えた拡張可能なメニューであり、非常にカスタマイズ可能である。

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

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

flutter pub add expandable_menu

パッケージ概要

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

ExpandableMenu は、無限のアイテムリストをサポートする拡張可能な水平メニューを提供する、非常にカスタマイズ可能な Flutter パッケージです。動的なナビゲーションを目的としており、複数のプラットフォームでメニューのセクションをスムーズに展開・折りたたみできます。豊富なスタイルとレイアウトオプションを備えており、応答性がありスクロール可能なメニューが必要な複雑なUIに最適です。Android、iOS、Web、macOS、Windows、Linux向けアプリへの統合もスムーズです。

用途

  • 動的ナビゲーションメニュー
  • 水平スクロールアイテムリスト
  • カスタマイズ可能なサイドパネル
  • レスポンシブUIレイアウト
  • 複雑なメニュー階層
  • クロスプラットフォームナビゲーション

主な機能

  • 無限の水平アイテムリスト
  • 非常にカスタマイズ可能なデザイン
  • 拡張可能/折りたたみ可能なセクション
  • クロスプラットフォーム互換性
  • スムーズなアニメーション
  • 柔軟なレイアウト制御

適している対象

  • 複雑なナビゲーションシステムを構築している開発者
  • 応答性のある水平メニューを必要とするアプリ
  • カスタマイズの柔軟性を求めるUIデザイナー
  • マルチプラットフォームのFlutterアプリケーション
  • インタラクティブダッシュボードインターフェース

注意事項

  • 非常に大きなアイテムリストに対してパフォーマンス最適化が必要になる可能性があります
  • カスタムスタイルは開発時間を増加させる可能性があります
  • 利用可能なドキュメントが限られています
  • 垂直メニューには適していません
  • スクロール動作の取り扱いに注意が必要です
  • 無限リストによるメモリ使用量の可能性

元の README

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

expandable_menu

Expandable menu is an expandable menu with infinite horizontal item list with high customizable ability.

Preview

Property Description
width This property declare width of widget when it's not expanded in initial state
height This property declare height of widget
items This property will contains items in list of menu
backgroundColor This property declare background color of widget and default value is [Color(0xFF4B5042)]
iconColor This property declare icon color of both icon(Arrow icon and Hamburger icon)
itemContainerColor This property declare item background color and if it's be null default value is [Colors.white.withOpacity(.4)]
animationSpeed This property declare animationspeed, default value is [500]
controller This property declare controller, if you want to remotely trigger open/close functions. Defaults to [null]

Usage

import 'package:expandable_menu/expandable_menu.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({
    Key? key,
  }) : super(key: key);

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  late ExpandableMenuController controller;

  @override
  void initState() {
    super.initState();
    controller = ExpandableMenuController();
  }

  @override
  Widget build(BuildContext context) {
    var test = Directionality.of(context);

    return Scaffold(
      backgroundColor: const Color(0xFF9FB373),
      body: ListView(
        padding: const EdgeInsets.symmetric(vertical: 100.0),
        children: [
          Center(
              child: SizedBox(
                height: 400.0,
                width: 290.0,
                child: Stack(
                  children: [
                    Positioned(
                      top: 23.0,
                      right: 23.0,
                      left: 23.0,
                      bottom: 0.0,
                      child: Container(
                        decoration: const BoxDecoration(
                          color: Colors.white,
                          borderRadius: BorderRadius.all(
                            Radius.circular(16.0),
                          ),
                        ),
                        child:
                        Column(
                          children: [
                            const SizedBox(height: 20),
                            TextButton(
                                onPressed: () {
                                  controller.open();
                                },
                                child: const Text("Open menu")),
                            TextButton(
                                onPressed: () {
                                  controller.close();
                                },
                                child: const Text("Close menu")),

                            TextButton(
                                onPressed: () {
                                  controller.toggle();
                                },
                                child: const Text("Toggle menu")),
                          ],
                        ),
                      ),
                    ),
                    Positioned(
                        top: 0.0,
                        left: 0.0,
                        right: 0.0,
                        child: ExpandableMenu(
                          width: 46.0,
                          height: 46.0,
                          controller: controller,
                          items: [
                            Container(),
                            Container(),
                            RawMaterialButton(
                              onPressed: () {
                                controller.close();
                              },
                              shape: const CircleBorder(),
                              child: const Icon(
                                Icons.arrow_right_alt,
                              ),
                            ),
                            Container(),
                            Container(),
                            Container(),
                            Container(),
                          ],
                        )),

                  ],
                ),
              )),
          const SizedBox(
            height: 40,
          ),
          Center(
              child: SizedBox(
                height: 200.0,
                width: 200.0,
                child: Stack(
                  children: [
                    Positioned(
                      top: 20.0,
                      right: 20.0,
                      left: 20.0,
                      bottom: 0.0,
                      child: Container(
                        decoration: const BoxDecoration(
                          color: Colors.white,
                          borderRadius: BorderRadius.all(
                            Radius.circular(16.0),
                          ),
                        ),
                      ),
                    ),
                    const Positioned(
                        top: 0.0,
                        left: 0.0,
                        right: 0.0,
                        child: ExpandableMenu(
                          width: 40.0,
                          height: 40.0,
                          items: [
                            Icon(
                              Icons.add,
                              color: Colors.white,
                            ),
                            Icon(
                              Icons.access_alarm,
                              color: Colors.white,
                            ),
                            Icon(
                              Icons.accessible_forward,
                              color: Colors.white,
                            ),
                            Icon(
                              Icons.accessibility_new_sharp,
                              color: Colors.white,
                            ),
                          ],
                        )),
                  ],
                ),
              )),
          const SizedBox(
            height: 40,
          ),
          Padding(
              padding: const EdgeInsets.symmetric(horizontal: 5.0),
              child: SizedBox(
                height: 200.0,
                child: Stack(
                  children: [
                    Positioned(
                      top: 20.0,
                      right: 20.0,
                      left: 20.0,
                      bottom: 0.0,
                      child: Container(
                        decoration: const BoxDecoration(
                          color: Colors.white,
                          borderRadius: BorderRadius.all(
                            Radius.circular(16.0),
                          ),
                        ),
                      ),
                    ),
                    Positioned(
                        top: 0.0,
                        left: 0.0,
                        right: 0.0,
                        child: ExpandableMenu(
                          width: 40.0,
                          height: 40.0,
                          backgroundColor: Colors.black,
                          iconColor: Colors.amber,
                          itemContainerColor: Colors.amber,
                          items: [
                            Container(),
                            Container(),
                            Container(),
                            Container(),
                            Container(),
                            Container(),
                            Container(),
                            Container(),
                            Container(),
                            Container(),
                            Container(),
                          ],
                        )),
                  ],
                ),
              )),
        ],
      ),
    );
  }
}

thanks to https://dribbble.com/Volorf for nice design.

カテゴリー

ソースリポジトリ

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

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