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

page_flip_builder のカバー
パッケージ詳細v0.1.4

page_flip_builder

アプリでインタラクティブなページめくりのトランジションを可能にするカスタムFlutterウィジェットです。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
360
いいね数
122
Pub ポイント
145

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

flutter pub add page_flip_builder

パッケージ概要

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

インタラクティブなページめくりアニメーションを提供するFlutterウィジェットで、デジタル読書体験やプレゼンテーションに最適です。スムーズでリアルなページ切り替えを実現し、電子書籍、ポートフォリオ、インタラクティブなチュートリアルなどのアプリにおけるユーザー参加度を高めます。パフォーマンスとカスタマイズ性を重視して設計されており、タッチジェスチャーに対応し、さまざまなレイアウトに統合可能です。パッケージは軽量で、すべての主要プラットフォームと互換性があります。

用途

  • デジタルブックリーダー
  • インタラクティブなプレゼンテーション
  • ポートフォリオの紹介
  • 教育アプリ
  • ゲームUI

主な機能

  • 現実的なページめくりアニメーション
  • ジェスチャー駆動型のインタラクション
  • クロスプラットフォーム対応
  • カスタマイズ可能な遷移効果
  • 軽量で効率的
  • 既存のウィジェットとの簡単な統合

適している対象

  • 魅力的なUIを求めるアプリ開発者
  • 電子書籍またはデジタル雑誌の作成者
  • インタラクティブな物語作りに焦点を当てたデザイナー
  • 教育またはチュートリアルアプリを開発する開発者
  • 複数のプラットフォームをターゲットにするチーム

注意事項

  • 複雑なレイアウト向けの最適化が必要になる場合があります
  • パフォーマンスはデバイスの機能に依存します
  • 2Dのフリップ効果のみ(3Dの奥行きなし)
  • 高周波アニメーションループには適していません
  • シンプルで焦点を絞ったコンテンツと併用するのが最適です

元の README

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

Page Flip Builder

Pub Language License Twitter

A custom Flutter widget that enables interactive page-flip transitions in your app.

You can use this to flip images, cards, or widgets of any size.

Preview

Page Flip screenshots

Card Flip screenshots

Also see the Flutter Web Live Preview.

Usage

Note: This package uses null-safety.

PageFlipBuilder is best used for full-screen page-flip transitions, but works with widgets of any size as long as their width and height is not unbounded.

PageFlipBuilder uses a drag gesture to interactively transition between a "front" and a "back" widget. These are specified with the frontBuilder and backBuilder arguments:

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Container(
        // add a black background to prevent flickering on Android when the page flips
        color: Colors.black,
        child: PageFlipBuilder(
          frontBuilder: (_) => LightHomePage(),
          backBuilder: (_) => DarkHomePage(),
        ),
      ),
    );
  }
}

By defalt the flip happens along the vertical axis, but you can change the flipAxis to Axis.horizontal if you want.

For more control, you can also add a GlobalKey<PageFlipBuilderState> and programmatically flip the page with a callback-based API:

class MyApp extends StatelessWidget {
  // used to flip the page programmatically
  final pageFlipKey = GlobalKey<PageFlipBuilderState>();
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Container(
        // add a black background to prevent flickering on Android when the page flips
        color: Colors.black,
        child: PageFlipBuilder(
          key: pageFlipKey,
          frontBuilder: (_) => LightHomePage(
            onFlip: () => pageFlipKey.currentState?.flip(),
          ),
          backBuilder: (_) => DarkHomePage(
            onFlip: () => pageFlipKey.currentState?.flip(),
          ),
          // flip the axis to horizontal
          flipAxis: Axis.horizontal,
          // customize tilt value
          maxTilt: 0.003,
          // customize scale
          maxScale: 0.2,
          // be notified when the flip has completed
          onFlipComplete: (isFrontSide) => print('isFrontSide: $isFrontSide'),
        ),
      ),
    );
  }
}

Features

  • Interactive flip transition using drag gestures (forward and reverse)
  • Fling animation to complete the transition on drag release
  • Flip page programmatically via callbacks
  • Flip around the horizontal or vertical axis
  • Flip widgets of any size
  • Customizable flip duration, tilt, scale

Testing the example app

Before running the example app, you need to create the ios, android, web folders as needed:

flutter create . --platform ios
flutter create . --platform android
flutter create . --platform web
LICENSE: MIT

カテゴリー

ソースリポジトリ

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

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