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

flexible_dropdown のカバー
パッケージ詳細v1.0.8

flexible_dropdown

スクリムをタップまたはスワイプしてドロップダウンを閉じることができ、ヘッダー(バリア)を透明に設定します

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

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

flutter pub add flexible_dropdown

パッケージ概要

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

Flutterパッケージで、スクリムをタップまたはパンすることでドロップダウンを閉じることができ、バリア効果を持つ透明ヘッダーをサポートします。標準のドロップダウンと比較して、ユーザー制御性とスムーズなインタラクションが向上しています。複数のプラットフォームでカスタマイズ可能で、ジェスチャー対応のドロップダウンメニューが必要なアプリに最適です。パッケージは軽量で、pub.dev経由で簡単に統合できます。

用途

  • カスタマイズ可能なドロップダウンの非表示
  • ジェスチャーによるドロップダウンナビゲーション
  • 透過ヘッダーデザイン
  • クロスプラットフォームドロップダウンコンポーネント
  • フォームおよび選択インターフェースのUX向上

主な機能

  • スクリムをタップして非表示にする
  • パンで消去ジェスチャー
  • 透過ヘッダーのサポート
  • バックドロップのバリア効果
  • クロスプラットフォーム互換性

適している対象

  • インタラクティブなドロップダウンを求める開発者
  • 直感的なユーザー操作を必要とするアプリ
  • 視覚的明確性に注目するデザイナー
  • マルチプラットフォームのFlutterアプリケーション
  • ドロップダウンを含むフォーム中心のUI

注意事項

  • ジェスチャーの衝突を慎重に処理する必要があります
  • 複雑なレイアウトにはカスタムスタイルが必要になる場合があります
  • 基本的な使用方法以外のドキュメントは限られている
  • 単純な静的ドロップダウンには適していません
  • 多数のアイテムによるパフォーマンスへの潜在的影響

元の README

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

Flexible Dropdown Package

Features

  • Customize dropdown

  • Auto scroll to selected item position

  • Support BarrierShape.headerTrans to highlight the content above the flexible dropdown button

  • Allows the dropdown to be dismissed by tapping | panning the scrim or by pressing the escape key on the keyboard.

  • Allow to choose the Animation Type

Installation

First, add flexible_dropdown as a dependency in your pubspec.yaml file.

dependencies:
  flexible_dropdown: ^1.0.7

Usage

FlexibleDropdown(
  overlayChild: Container(
    height: 160,
    width: double.infinity,
    color: Colors.deepPurple,
  ),
  barrierColor: Colors.black38.withOpacity(.2),
  barrierShape: BarrierShape.headerTrans,
  textDirection: TextDirection.ltr,
  offset: Offset.zero,
  duration: const Duration(milliseconds: 400),
  animationType: AnimationType.size,
  animationAlignment: Alignment.topCenter,
  child: Container(
    decoration: BoxDecoration(
      borderRadius: BorderRadius.circular(6),
      color: Colors.blueAccent.withOpacity(.2),
    ),
    child: Padding(
      padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 20),
      child: Text(
        title,
        style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
      ),
    ),
  ),
)

Usage to close the flexible dropdown:

Navigator.pop(context);

Animation Type

scale scaleX scaleY
size slide fade
rotate

Note: AnimationType.size is only suitable for width of overlayChild is full screen width.

カテゴリー

依存関係

依存関係一覧 1 件

  • plugin_platform_interface^2.0.2

ソースリポジトリ

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

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