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

パッケージ詳細v1.0.2

cube_transition

PageView および PageRoute の遷移に使える美しい3Dキューブ効果。

30日間ダウンロード
47
いいね数
70
Pub ポイント
40

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

flutter pub add cube_transition

パッケージ概要

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

CubeTransition は、PageView および PageRoute の遷移に滑らかな 3D キューブアニメーション効果を提供する Flutter パッケージです。画面やページ間のナビゲーションに奥行きと視覚的な魅力を加えることで、ユーザー体験を向上させます。このパッケージは Flutter のレンダリング機能を活用し、実際のキューブが 3D 空間で回転するように見せる没入型のカード風のフリップアニメーションを生成します。複雑な実装なしにモダンで魅力的な遷移を求めるアプリに最適です。既存の Flutter ナビゲーションパターンとスムーズに統合されます。

用途

  • PageView のページ遷移
  • PageRoute のナビゲーション効果
  • インタラクティブなアプリオンボーディング
  • タブ切り替え時の視覚フィードバック
  • モバイルアプリのUIの完成度を高める

主な機能

  • 3Dキューブ回転アニメーション
  • スムーズでカスタマイズ可能な遷移
  • PageView および PageRoute と連携可能
  • 軽量で統合が簡単
  • 方向の反転をサポート

適している対象

  • 現代的なUIアニメーションを求める開発者
  • インタラクティブなナビゲーションを持つアプリ
  • デザイン重視のFlutterプロジェクト
  • ユーザー参加を重視するモバイルアプリ

注意事項

  • 3Dキューブスタイルのみに制限
  • 低性能デバイスでのパフォーマンスに影響を与える可能性があります
  • キューブのサイズやテクスチャに対する組み込みカスタマイズ機能なし
  • 遷移状態の手動処理が必要です
  • 非インタラクティブまたは最小限のUIデザインには適していません

元の README

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

Cube Transition

pub package

A 3D Cube transition for your PageView and PageRoute.

Aeyrium Inc. is a provider of innovative software solutions for the business and commercial aviation

Features

  • Use the cube transition between the navigation of your pages.
  • Add cube transitions to your PageView.
  • Add custom transformation in your items of your PageView.

Getting started

You should ensure that you add the dependency in your flutter project.

dependencies:
  cube_transition: "^1.0.0"

You should then run flutter packages upgrade or update your packages in IntelliJ.

Import the package:

import 'package:cube_transition/cube_transition.dart';

Example Project

There is a example project in the example folder. Check it out. Otherwise, keep reading to get up and running.

Usage

Navigator Cube Transition

class Sample1 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Navigator Cube Transition'),
      ),
      body: Center(
        child: RaisedButton(
          child: Text('Next Page'),
          onPressed: () {
            Navigator.of(context).push(
              CubePageRoute(
                enterPage: Sample1NextPage(),
                exitPage: this,
                duration: const Duration(milliseconds: 900),
              ),
            );
          },
        ),
      ),
    );
  }
}

PageView Cube Transition (default)

class Sample2 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final height = MediaQuery.of(context).size.height / 2;
    return Scaffold(
      appBar: AppBar(
        title: Text('PageView Cube Transition'),
      ),
      body: Center(
        child: SizedBox(
          height: height,
          child: CubePageView(
            children: places
                .map(
                  (item) =>  Image.network(
                        item.url,
                        height: height,
                        fit: BoxFit.cover,
                      ),
                )
                .toList(),
          ),
        ),
      ),
    );
  }
}

PageView Cube Transition Custom (If you want more control over the items inside the CubePageView)

class Sample3 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final height = MediaQuery.of(context).size.height / 2;
    return Scaffold(
      appBar: AppBar(
        title: Text('Custom Cube Transition'),
      ),
      body: Center(
        child: SizedBox(
          height: height,
          child: CubePageView.builder(
            itemCount: places.length,
            itemBuilder: (context, index, notifier) {
              final item = places[index];
              final transform = Matrix4.identity();
              final t = (index - notifier).abs();
              final scale = lerpDouble(1.5, 0, t);
              transform.scale(scale, scale);
              return CubeWidget(
                index: index,
                pageNotifier: notifier,
                child: Stack(
                  children: [
                    Image.network(
                      item.url,
                      height: height,
                      fit: BoxFit.cover,
                    ),
                    Transform(
                      alignment: Alignment.center,
                      transform: transform,
                      child: Center(
                        child: Padding(
                          padding: const EdgeInsets.all(12.0),
                          child: Container(
                            decoration: BoxDecoration(boxShadow: [
                              BoxShadow(
                                color: Colors.black45,
                                spreadRadius: 5,
                                blurRadius: 5,
                              ),
                            ]),
                            child: Text(
                              item.name.split('-').join('\n'),
                              textAlign: TextAlign.center,
                              style: Theme.of(context).textTheme.title,
                            ),
                          ),
                        ),
                      ),
                    ),
                  ],
                ),
              );
            },
          ),
        ),
      ),
    );
  }
}

Copyright Aeyrium Inc

You can follow me on twitter @diegoveloper

カテゴリー

ソースリポジトリ

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

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