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

パッケージ詳細v1.5.0

device_frame_plus

Flutterパッケージは、一般的なデバイスのモックアップを提供し、開発者がシミュレートされたデバイスフレーム内でアプリをプレビューおよびテストできるようにします。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
50.4万
いいね数
57
Pub ポイント
150

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

flutter pub add device_frame_plus

パッケージ概要

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

DeviceFramePlus は、Android、iOS、Web、macOS、Windows、Linux のリアルで事前に設計されたデバイスフレーム内でアプリのインターフェースを表示できる Flutter パッケージです。人気のあるデバイスのカスタマイズ可能なモックアップを提供することで、UIプレビューを簡単にし、異なる画面サイズや向きでのアプリの表示状態を視覚的に確認できます。プレゼンテーション、ドキュメント作成、初期デザインレビューに最適で、最小限のセットアップで開発ワークフローを向上させます。このパッケージは pub.dev を通じて Flutter プロジェクトにシームレスに統合できます。

用途

  • アプリUIのプレビュー
  • デザインドキュメンテーション
  • プレゼンテーション資料
  • クロスプラットフォームテスト
  • 開発者デモ

主な機能

  • 事前定義されたデバイステンプレート
  • カスタマイズ可能なフレームスタイル
  • マルチプラットフォーム対応
  • 簡単な統合
  • レスポンシブレイアウトのレンダリング

適している対象

  • UI/UXデザイナー
  • Flutter開発者
  • プロダクトマネージャー
  • 技術ライター

注意事項

  • 静的モックアップに限定
  • インタラクティブデバイスの動作なし
  • 視覚的参照用のみ
  • 機能テストを目的としていません

元の README

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

device_frame_plus

Mockups for common devices.

Quickstart

Wrap any widget in a DeviceFrame widget and give it a device (multiple devices are available from the Device accessors).

DeviceFrame(
    device: Devices.ios.iPhone11,
    isFrameVisible: true,
    orientation: Orientation.portrait,
    screen: Container(
        color: Colors.blue,
        child: Text('Hello'),
    ),
)

Examples

Usage

Displaying a virtual keyboard

To display a generic simulated virtual keyboard, simply wrap any widget in a VirtualKeyboard.

DeviceFrame(
    device: Devices.ios.iPhone11,
    orientation: orientation,
    screen: VirtualKeyboard(
        isEnabled: true,
        child: // ...
    ),
)
Maintain device media query and theme in an encapsulated app

To make sure that a WidgetsApp uses the simulated MediaQuery from the simulated devices, set its useInheritedMediaQuery property to true.

DeviceFrame(
    device: Devices.ios.iPhone11,
    orientation: orientation,
    screen: Builder(
        builder: (deviceContext) => MaterialApp(
            useInheritedMediaQuery: true,
            theme: Theme.of(context),
        ),
    ),
),
Creating a custom generic device

Various generic devices are available as DeviceInfo factories to make it easy to create custom device instances.

Phone
DeviceInfo.genericPhone(
    platform: TargetPlatform.android,
    name: 'Medium',
    id: 'medium',
    screenSize: const Size(412, 732),
    safeAreas: const EdgeInsets.only(
      left: 0.0,
      top: 24.0,
      right: 0.0,
      bottom: 0.0,
    ),
    rotatedSafeAreas: const EdgeInsets.only(
      left: 0.0,
      top: 24.0,
      right: 0.0,
      bottom: 0.0,
    ),
)
Tablet
DeviceInfo.genericTablet(
    platform: TargetPlatform.android,
    name: 'Medium',
    id: 'medium',
    screenSize: const Size(1024, 1350),
    safeAreas: const EdgeInsets.only(
      left: 0.0,
      top: 24.0,
      right: 0.0,
      bottom: 0.0,
    ),
    rotatedSafeAreas: const EdgeInsets.only(
      left: 0.0,
      top: 24.0,
      right: 0.0,
      bottom: 0.0,
    ),
)
Desktop monitor
DeviceInfo.genericDesktopMonitor(
    platform: TargetPlatform.windows,
    name: 'Wide',
    id: 'wide',
    screenSize: const Size(1920, 1080),
    windowPosition: Rect.fromCenter(
      center: const Offset(
        1920 * 0.5,
        1080 * 0.5,
      ),
      width: 1620,
      height: 780,
    ),
)
Laptop
DeviceInfo.genericLaptop(
    platform: TargetPlatform.windows,
    name: 'Laptop',
    id: 'laptop',
    screenSize: const Size(1920, 1080),
    windowPosition: Rect.fromCenter(
      center: const Offset(
        1920 * 0.5,
        1080 * 0.5,
      ),
      width: 1620,
      height: 780,
    ),
)

Available devices

Screenshots for all available devices are available in the test/devices directory

Contributing

Edit device frames

All frames are designed in a Figma file.

カテゴリー

ソースリポジトリ

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