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

pip_view のカバー
パッケージ詳細v0.9.7

pip_view

浮動ウィジェットの下にウィジェットを表示するためのウィジェット。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
1.3万
いいね数
202
Pub ポイント
160

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

flutter pub add pip_view

パッケージ概要

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

pip_view パッケージは、開発者がフローティングオーバーレイの下にウィジェットを表示できるようにし、一般的にピクチャインピクチャ機能に使用されます。大きなアプリインターフェース内に小さなドラッグ可能なコンテンツ領域をスムーズに統合でき、動画再生やライブフィードに最適です。このパッケージは Android、iOS、Web、macOS、Windows、Linux など複数のプラットフォームをサポートしており、クロスプラットフォームでの一貫性を確保します。軽量で、最小限の構成で簡単に実装できるよう設計されています。これにより、メインUIの流れを妨げることなく、動的でインタラクティブなオーバーレイが必要なアプリに適しています。

用途

  • ピクチャインピクチャモードでの動画再生
  • ライブカメラフィードオーバーレイ
  • インタラクティブな浮遊コントロール
  • マルチタスクアプリインターフェース
  • リアルタイムデータモニタリング表示

主な機能

  • ドラッグ対応のフローティングウィジェット
  • メインコンテンツの下にオーバーレイをレンダリング
  • クロスプラットフォーム互換性
  • 最小限のセットアップが必要
  • カスタマイズ可能なサイズと位置

適している対象

  • メディアアプリケーション
  • デュアルスクリーンレイアウトを備えた教育ツール
  • 共同作業アプリ
  • リアルタイムモニタリングダッシュボード
  • 永続的な浮動UI要素を必要とするアプリ

注意事項

  • 複雑なジェスチャーに対応するための追加処理が必要になる場合があります
  • 低スペックデバイスへのパフォーマンスへの影響
  • 高度なアニメーションのカスタマイズが限られている
  • フルスクリーンの置き換えを想定していません
  • 複雑なUIでは適切なレイアウト管理が必要です

元の README

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

pip_view

Widget to allow the presentation of a widget below a floating one. It supports moving the floating widget around which sticks to the corners.

Example GIF

Usage

Create a PIPView widget, the prop builder will be the view rendered floating when requested. To present a view below the floating view use PIPView.of(context).presentBelow(MyWidget()).

Props:
  • avoidKeyboard: whether the floating view should avoid the keyboard;
  • builder: a builder for the widget to float, the second parameter indicates if the view is floating;
  • initialCorner: the corner in which the floating view will be sticked initially
    • Possible values are: PIPViewCorner.topLeft, PIPViewCorner.topRight, PIPViewCorner.bottomLeft, PIPViewCorner.bottomRight;
  • floatingHeight: the height of the foreground view when floating. If not set is calculated from the floatingWidth to keep aspect ratio of the screen;
  • floatingWidth: the width of the foreground view when floating. If not set and floatingHeight is set, it is calculated from the floatingHeight value to keep aspect ratio of the screen. If not set and floatingHeight is not set, defaults to 100.0;
Example:
class MyScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return PIPView(
      builder: (context, isFloating) {
        return Scaffold(
          body: Column(
            children: [
              Text('This is the screen that will float!');
              MaterialButton(
                child: Text('Start floating');
                onPressed: () {
                  PIPView.of(context).presentBelow(MyBackgroundScreen());
                },
              ),
            ],
          );
        );
      },
    );
  }
}

class MyBackgroundScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Text('This is my background screen!');
    );
  }
}

NOTE: If you want a more declarative way of using the PIPView, you can use RawPIPView instead.

カテゴリー

ソースリポジトリ

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

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