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

expand_widget のカバー
パッケージ詳細v3.1.1

expand_widget

ウィジェットのコレクションやテキストを簡単に展開および折りたたむ機能

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

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

flutter pub add expand_widget

パッケージ概要

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

expand_widget パッケージは、ウィジェットやテキストコンテンツの拡張および収縮をアニメーション化するシンプルで直感的な方法を提供します。折りたたみ状態と展開状態の間でのスムーズな遷移を可能にし、アコーディオンや折りたたみ可能なセクションなどのインタラクティブUI要素を作成するのに最適です。使いやすさを重視して設計されており、複数のプラットフォームに対応するFlutterアプリにシームレスに統合できます。カスタムアニメーション、持続時間の制御、柔軟なコンテンツレイアウトをサポートしており、小さなコンポーネントから複雑なUI構造まで幅広く対応可能です。

用途

  • 折りたたみ可能なアコーディオンの作成
  • インタラクティブなFAQセクションの構築
  • リスト内のコンテンツのアニメーション表示
  • レスポンシブカードインターフェースの設計
  • 動的フォームセクションの実装

主な機能

  • スムーズな展開/収縮アニメーション
  • カスタマイズ可能なアニメーションの持続時間
  • 任意のウィジェットをコンテンツとしてサポート
  • 既存のレイアウトとの簡単な統合
  • 柔軟なトリガーメカニズム

適している対象

  • シンプルな拡張コントロールを求める開発者
  • インタラクティブなカードを構築するUIデザイナー
  • 動的コンテンツ切り替えを必要とするアプリ
  • クロスプラットフォームのFlutterアプリケーション
  • アコーディオンスタイルのインターフェースを持つプロジェクト

注意事項

  • 大きなウィジェットツリーではパフォーマンスに影響を与える可能性があります
  • 状態管理の慎重な取り扱いが必要です
  • アニメーションの動作は、親レイアウトの制約に依存します
  • 非常に高い周波数の切り替えには最適化されていません
  • 最適な応答性を得るために、軽量コンテンツと併用してください

元の README

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

Expand Widget

Package style: very good analysis Build Patreon License

This Dart package offers developers a streamlined library of Flutter widgets, useful for expanding widgets and text views, when users interact with them.

There are two main 'expand' widgets:

  • Expand Child: Useful to show more widgets related to the content already visible by the user.
  • Expand Text: Useful when texts can be quite big for a certain screen. It adds the ability to show the full content when the user wants to.

Features

  • The ExpandIndicatorStyle parameter allows you to select various render options, related to the expand arrow itself.

  • Hide the arrow widget when the view is being expanded, using the hideIndicatorOnExpand parameter.

  • Custimze the arrow widget itself: color, size, padding, icon...

  • You can also provide your own widget for the expand indicator, using the indicatorBuilder for both expaning widgets.

  • Use custom expanding hint strings! By default, it will use the ones provided by MaterialLocalizations.

  • Expand text view with swipe-down gestures, using the expandOnGesture, which by default is set to false.

  • You can also customize expand animation duration and curve easilly.

  • The collapsedVisibilityFactor (exclusive to the ExpandChild widget), allows the reveal of a section of the hidden content.

Example

Here is an example of a simple use of this package, featuring the ExpandChild & ExpandText widgets.

If you want to take a deeper look at the example, take a look at the example folder provided with the project.

  • ExpandChild
ExpandChild(
  child: Column(
    children: [
      OutlineButton(
        child: Text('Button1'),
        onPressed: () => print('Pressed button1'),
      ),
      OutlineButton(
        child: Text('Button2'),
        onPressed: () => print('Pressed button2'),
      ),
      OutlineButton(
        child: Text('Button3'),
        onPressed: () => print('Pressed button3'),
      ),
    ],
  ),
),
  • ExpandText
ExpandText(
  'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
  textAlign: TextAlign.justify,
),

Getting Started

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Built with

Authors

License

This project is licensed under the GNU GPL v3 License - see the LICENSE file for details.

カテゴリー

ソースリポジトリ

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