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

パッケージ詳細v1.0.0-beta

navigation_drawer_menu

Flutter Material Design ナビゲーションドロワー メニュー。このパッケージでは、ListView と同様に動作する NavigationDrawerMenu ウィジェットを提供します。例では完全なナビゲーションドロワーが実装されています。

30日間ダウンロード
27
いいね数
27
Pub ポイント
60

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

flutter pub add navigation_drawer_menu

パッケージ概要

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

Material Design準拠のNavigationDrawerMenuウィジェットを提供するFlutterパッケージで、ナビゲーションドロワー内でのListViewと同様の動作を行います。完全なナビゲーションドロワーの実装を、組み込みのスタイルとレイアウトロジックにより簡素化し、Material Designの原則に沿っています。典型的な使用ケースを示す完全なサンプルが含まれており、開発者がアプリに直感的なナビゲーションを簡単に統合できるようにしています。プラットフォーム間でのシンプルさと一貫性を重視して設計されています。

用途

  • モバイルアプリにおけるサイドナビゲーションの実装
  • 折りたたみメニューを使用したレスポンシブレイアウトの作成
  • 階層的ナビゲーションを使用した管理ダッシュボードの構築
  • スクリーン間で一貫したナビゲーションパターンを追加する

主な機能

  • Material Design準拠のUI
  • ドロワー内の ListView に似た動作
  • 迅速な統合用の組み込み例
  • メニュー項目の設定用シンプルな API
  • 動的コンテンツレンダリングをサポート

適している対象

  • Flutter初心者がナビゲーションパターンを学ぶ
  • 迅速なドロワー実装を求める開発者
  • 標準のマテリアルデザインナビゲーションを必要とするアプリ
  • 軽量なナビゲーションソリューションを必要とするプロジェクト

注意事項

  • 基本的なスタイルを超えるカスタマイズは限定的
  • ネストされたナビゲーションの組み込みサポートなし
  • 複雑なルーティングには追加の論理が必要になる場合があります
  • 大規模なメニュー項目リストには最適化されていません

元の README

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

navigation_drawer_menu

Flutter Material Design Navigation Drawer Menu

Navigation drawer is a common UI pattern for adaptive menus. The Material Design documentation formalizes the behavior of the menu but this pattern is not peculiar to Material Design. The pattern includes a basic Hamburger menu but isn't limited to small screens. The menu pattern suits all screen sizes. On larger width screens you see the icon and text, smaller screens will display icons only, and on phones, the menu will disappear during normal use and slide in with the hamburger icon.

Hamburger Menu

Beta

This widget is in beta and the public interface is likely to change

Example

The example aims to implement the Navigation Drawer pattern documented above. This is a work in progress and conformance to the behavior in the Material Design documentation is the long term aim. Pull requests to fix behavior are welcome. The example works on all form factors: desktop and tablet (landscape, portrait), phone, and web. Try resizing the width of the window to see how the behavior changes. Most of the behavior exists in the example. the aim is to create a new widget which will replace Scaffold and allow you to spin up new apps with this functionality very quickly.

Note: if you're just looking for a simple drawer menu that doesn't adapt to the screen, check out this.

Hamburger Menu

Hamburger Menu

Hamburger Menu

Run the Example
  • Open the root folder in Visual Studio Code
  • Open a terminal window
  • Add platforms by running these commands in the root folder (not example folder)
  • Click Run -> Start Debugging
flutter create example --platforms=windows,macos,linux

flutter create --platforms=web

flutter create --platforms=android

NavigationDrawerMenu

This is a widget that basically functions like a ListView. However, it exists to remove some of the boilerplate code necessary for constructing the menu, and allows you to put arbitrary sized spacers and headings inside the menu. The example uses this set of definitions. If you don't want to use this widget, you can use ListView instead.

final Map<Key, MenuItemContent> menuItems = {
  alarmValueKey: MenuItemContent(
      menuItem: MenuItemDefinition("Alarm", alarmValueKey,
          iconData: Icons.access_alarm)),
  todoValueKey: MenuItemContent(
      menuItem: MenuItemDefinition("Todo", todoValueKey,
          iconData: Icons.ad_units_rounded)),
  photoValueKey: MenuItemContent(
      menuItem: MenuItemDefinition("Photo", photoValueKey,
          iconData: Icons.add_a_photo_outlined))
};

カテゴリー

依存関係

依存関係一覧 1 件

  • material^1.0.0+2

ソースリポジトリ

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

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