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

folding_cell のカバー
パッケージ詳細v1.0.2

folding_cell

シンプルな折り畳みセルウィジェット。frontWidget と innerWidget を渡して折りたたみおよび展開します。

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

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

flutter pub add folding_cell

パッケージ概要

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

カード型コンポーネント向けのスムーズな折りたたみ・展開アニメーションを可能にするシンプルなFlutterウィジェットです。frontWidgetとinnerWidgetを提供することで、折りたたみ可能なコンテンツセクションに最適なインタラクティブな拡張セルを作成できます。このパッケージはAndroid、iOS、Web、macOS、Windows、Linuxなど複数のプラットフォームをサポートしており、クロスプラットフォームアプリに非常に適しています。軽量で簡単に統合でき、複雑なセットアップなしにクリーンなUI遷移に焦点を当てています。

用途

  • 拡張可能なプロフィールカードの作成
  • インタラクティブなFAQセクションの構築
  • 折りたたみ可能なタスクリストの設計
  • アニメーション付き製品詳細の実装
  • 応答性のあるナビゲーションドロワーの開発

主な機能

  • スムーズな折りたたみ/展開アニメーション
  • カスタム前面および内部ウィジェットのサポート
  • クロスプラットフォーム互換性
  • 最小構成が必要
  • 軽量でパフォーマンスに優れる

適している対象

  • シンプルな拡張可能なUI
  • カードベースのインターフェース
  • モバイルファーストデザイン
  • インタラクティブなレイアウトのプロトタイピング
  • 繊細なアニメーションが必要なアプリ

注意事項

  • 基本的な折り畳みを超えるカスタマイズは限られている
  • 複雑なネストされたアニメーションには適していません
  • 高度なビジュアルを実現するには、追加のスタイリングが必要になる場合があります
  • 単層折り畳み専用
  • 重い内部ウィジェットがあるとパフォーマンスが変動する可能性があります

元の README

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

Simple FoldingCell widget

Simple folding cell widget, pass frontWidget and innerWidget to fold and unfold.

pub package

Installation

Add dependency in pubspec.yaml:

dependencies:
  folding_cell: "^1.0.2"

Import in your project:

import 'package:folding_cell/folding_cell.dart';

Basic usage

class FoldingCellSimpleDemo extends StatelessWidget {
  final _foldingCellKey = GlobalKey<SimpleFoldingCellState>();

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Color(0xFF2e282a),
      alignment: Alignment.topCenter,
      child: SimpleFoldingCell.create(
        key: _foldingCellKey,
        frontWidget: _buildFrontWidget(),
        innerWidget: _buildInnerWidget(),
        cellSize: Size(MediaQuery.of(context).size.width, 140),
        padding: EdgeInsets.all(15),
        animationDuration: Duration(milliseconds: 300),
        borderRadius: 10,
        onOpen: () => print('cell opened'),
        onClose: () => print('cell closed'),
      ),
    );
  }

  Widget _buildFrontWidget() {
    return Container(
      color: Color(0xFFffcd3c),
      alignment: Alignment.center,
      child: Stack(
        children: <Widget>[
          Align(
            alignment: Alignment.center,
            child: Text(
              "CARD TITLE",
              style: GoogleFonts.aldrich(
                color: Color(0xFF2e282a),
                fontSize: 20.0,
                fontWeight: FontWeight.bold,
              ),
            ),
          ),
          Positioned(
            right: 10,
            bottom: 10,
            child: TextButton(
              onPressed: () => _foldingCellKey?.currentState?.toggleFold(),
              child: Text(
                "OPEN",
              ),
              style: TextButton.styleFrom(
                backgroundColor: Colors.white,
                minimumSize: Size(80, 40),
              ),
            ),
          )
        ],
      ),
    );
  }

  Widget _buildInnerWidget() {
    return Container(
      color: Color(0xFFecf2f9),
      padding: EdgeInsets.only(top: 10),
      child: Stack(
        children: [
          Align(
            alignment: Alignment.topCenter,
            child: Text(
              "CARD TITLE",
              style: GoogleFonts.aldrich(
                color: Color(0xFF2e282a),
                fontSize: 22.0,
                fontWeight: FontWeight.bold,
              ),
            ),
          ),
          Align(
            alignment: Alignment.center,
            child: Text(
              "CARD DETAIL",
              style: GoogleFonts.aldrich(
                color: Color(0xFF2e282a),
                fontSize: 40.0,
              ),
            ),
          ),
          Positioned(
            right: 10,
            bottom: 10,
            child: TextButton(
              onPressed: () => _foldingCellKey?.currentState?.toggleFold(),
              child: Text(
                "Close",
              ),
              style: TextButton.styleFrom(
                backgroundColor: Colors.white,
                minimumSize: Size(80, 40),
              ),
            ),
          ),
        ],
      ),
    );
  }
}

Examples

example project contains these two demos

Demo 1 - FoldingCell inside Container

alt tag

Demo 2 - FoldingCell inside ListView

alt tag

Changelog

Check Changelog for updates

Bugs/Requests

Reporting issues and requests for new features are always welcome.

カテゴリー

ソースリポジトリ

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

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