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

coast のカバー
パッケージ詳細v2.0.2

coast

Hero風のアニメーションをサポートする PageView ラッパー

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

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

flutter pub add coast

パッケージ概要

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

Coast は、PageView を拡張してページ間で Hero のようなアニメーションを可能にする Flutter パッケージであり、滑らかで視覚的に魅力的な遷移を提供します。アニメーションのライフサイクルを自動的に管理することで、ページ境界をまたいで共有要素の遷移を実装しやすくします。カードベースのナビゲーションやコンテンツが豊富なインターフェースを持つアプリに最適です。画面間の連続性によりユーザー体験が向上します。このパッケージはすべての主要プラットフォームをサポートしており、デバイス間で一貫した動作を保証します。

用途

  • カードベースのナビゲーション
  • コンテンツが豊富なアプリインターフェース
  • スムーズな画面遷移
  • PageView 内の Hero ライクなアニメーション
  • ページ間で共有される要素のアニメーション

主な機能

  • Hero風のアニメーション処理を自動で行う
  • PageView とのシームレスな統合
  • クロスプラットフォーム対応
  • 最小限のボイラープレートコード
  • 共有エレメントの遷移をサポート

適している対象

  • スムーズなページ遷移を求める開発者
  • 動的なコンテンツフローを持つアプリ
  • UI中心のアプリケーション
  • 視覚的連続性を必要とするFlutterプロジェクト
  • アニメーションの整合性を優先するチーム

注意事項

  • 重いウィジェットではパフォーマンスに影響する可能性があります
  • 最適な結果を得るためには、Widgetの構造に注意が必要です
  • 手動でのHero設定と比較してカスタマイズの選択肢が限られている
  • 中程度の複雑さの遷移に最適
  • 非常に複雑なアニメーションチェーンには向かない

元の README

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

coast

build

PageView wrapper supporting Hero-like animations

img/example

Example

Create a Coast with a number of Beaches and add a CrabController as observer to the Coast. Wrap a widget that you want to animate between beaches with a Crab widget with the same tag.

class CoastExampleApp extends StatefulWidget {
  @override
  _CoastExampleAppState createState() => _CoastExampleAppState();
}

class _CoastExampleAppState extends State<CoastExampleApp> {
  final _beaches = [
    Beach(builder: (context) => Cadzand()),
    Beach(builder: (context) => Westkapelle()),
    Beach(builder: (context) => Zoutelande()),
  ];

  final _coastController = CoastController();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Coast(
        beaches: _beaches,
        controller: _coastController,
        observers: [
          CrabController(),
        ],
      ),
    );
  }
}


class Cadzand extends StatelessWidget {
  @override
  Widget build(BuildContext context) => Scaffold(
    appBar: AppBar(
      title: Text("Cadzand"),
      backgroundColor: Colors.deepOrange,
    ),
    body: Stack(
      children: [
        Positioned(
          top: 40,
          left: 40,
          child: Crab(
            tag: "container",
            child: Container(
              color: Colors.green,
              width: 80,
              height: 60,
            ),
          ),
        ),
      ],
    ),
  );
}

class Westkapelle extends StatelessWidget {
  @override
  Widget build(BuildContext context) => Scaffold(
    appBar: AppBar(
      title: Text("Westkapelle"),
      backgroundColor: Colors.amber,
    ),
    body: Stack(
      children: [
        Positioned(
          top: 80,
          right: 40,
          child: Crab(
            tag: "container",
            child: Container(
              color: Colors.green,
              width: 200,
              height: 100,
            ),
          ),
        ),
      ],
    ),
  );
}

class Zoutelande extends StatelessWidget {
  @override
  Widget build(BuildContext context) => Scaffold(
    appBar: AppBar(
      title: Text("Zoutelande"),
      backgroundColor: Colors.deepPurple,
    ),
    body: Stack(
      children: [
        Positioned(
          bottom: 40,
          left: 20,
          child: Crab(
            tag: "container",
            child: Container(
              color: Colors.green,
              width: 100,
              height: 200,
            ),
          ),
        ),
      ],
    ),
  );
}

カテゴリー

ソースリポジトリ

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

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