カテゴリー・パッケージ・リポジトリを検索

パッケージ詳細v0.0.2

scrollable_reorderable_navbar

5つ以上のナビゲーション項目を表示する場合にスクロール可能な下部ナビゲーションバーです。ユーザーがアイテムの順序をスワイプで変更でき、ナビゲーションバーからアイテムを削除することもできます。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
15
いいね数
30
Pub ポイント
140

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

flutter pub add scrollable_reorderable_navbar

パッケージ概要

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

5つ以上の項目が存在する場合に動的に調整される、スクロール可能かつ再配置可能なFlutter用のボトムナビゲーションバーです。ユーザーはスワイプして項目を再配置し、ナビゲーションバーから直接削除できます。多数のタブを持つアプリケーションにおける直感的なナビゲーションを目的としており、モバイルおよびデスクトッププラットフォームでの使いやすさを向上させます。このパッケージはAndroid、iOS、Web、macOS、Windows、Linuxなど、すべての主要プラットフォームをサポートしています。滑らかなスクロールとジェスチャーによる再配置・削除機能を組み合わせ、ナビゲーションアイテムの管理に柔軟なインターフェースを提供します。

用途

  • 5つ以上のナビゲーション項目を備えたアプリ
  • カスタマイズ可能な下部ナビゲーションレイアウト
  • ユーザー主導のタブ再順序付け
  • 動的ナビゲーション項目の管理
  • デスクトップおよびモバイルクロスプラットフォームアプリ

主な機能

  • 5個以上のアイテムがある場合にスクロール可能
  • スワイプによる並べ替え機能
  • ナビゲーション項目の削除
  • クロスプラットフォーム対応(Android、iOS、Web、macOS、Windows、Linux)
  • スムーズなジェスチャーに基づくインタラクション

適している対象

  • 柔軟なボトムナビゲーションバーが必要な開発者
  • 動的ナビゲーションカスタマイズを必要とするアプリ
  • 複数のプラットフォームをターゲットにするプロジェクト
  • UIs with frequent user interaction on navigation
  • インタラクティブなナビゲーションコンポーネントを探しているデザイナー

注意事項

  • 追加の状態管理が必要になる場合があります
  • 静的ナビゲーション設定には適していません
  • 非常に大きなアイテムリストによるパフォーマンスへの影響
  • ボトムナビゲーションレイアウトに制限
  • アイテム削除のUXを慎重に扱う必要があります

元の README

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

ScrollableReordableNavbar for Flutter

A flutter plugin for create bottom nav bar that can be scrolled when there are than 5 nav items to display. It also let user swipe items position and item can be deleted from the navbar.

Installing:

In your pubspec.yaml

dependencies:
  scrollable_reorderable_navbar: ^0.0.1
import 'package:scrollable_reorderable_navbar/scrollable_reorderable_navbar.dart';


Basic Usage:

    ScrollableReorderableNavBar(
      onItemTap: (arg) {
        setState(() {
          _selectedIndex = arg;
        });
      },
      onReorder: (oldIndex, newIndex) {
        final currItem = _items[_selectedIndex];
        if (oldIndex < newIndex) newIndex -= 1;
          final newItems = [..._items], item = newItems.removeAt(oldIndex);
          newItems.insert(newIndex, item);
        setState(() {
          _items = newItems;
          _selectedIndex = _items.indexOf(currItem);
        });
      },
    items: _items,
    selectedIndex: _selectedIndex,
    onDelete: (index) => setState(() => _items.removeAt(index)),
    deleteIndicationWidget: Container(
      padding: const EdgeInsets.only(bottom: 100),
      child: Align(
        alignment: Alignment.bottomCenter,
        child: Wrap(
          alignment: WrapAlignment.center,
          crossAxisAlignment: WrapCrossAlignment.center,
          direction: Axis.vertical,
          children: [
            Text("Tap on nav item to delete it.",
              style: Theme.of(context).textTheme.bodyText1,
              textAlign: TextAlign.center),
            TextButton(onPressed: () {}, child: const Text("DONE"))
          ],
        ),
      ),
    ),
  )


Custom usage

There are options that let you custom the navbar:\

Properties Description
List<NavBarItem> items Items composing the navbar, every items should have different names
int selectedIndex The index of the selected NavBarItem
ValueChanged<int> onItemTap Which behaviour should have after the user tap on a NavBarItem
ReorderCallback onReorder Which behaviour should have after user swap 2 NavBarItem
Widget deleteIndicationWidget The Widget displayed on top of the delete overlay to show user that he can tap on NavBarItem to delete them
ValueChanged<int> onDelete Which behaviour should have after user delete a NavBarItem
ReorderItemProxyDecorator? proxyDecorator How the widget should look like on a reorder operation
Color backgroundColor Background color of the navbar
Duration duration Duration of the animations
BoxDecoration? decoration Decoration of the entire navbar. You should use either backgroundColor or this one

Additional information

Don't hesitate to suggest any features or fix that will improve the package!

カテゴリー

ソースリポジトリ

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

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