패키지, 저장소 및 앱 카테고리 검색

flutter_device_emulator 표지
패키지 상세v0.0.3

flutter_device_emulator

실시간으로 여러 기기 화면에서 Flutter 위젯을 미리 봅니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
45
좋아요
0
Pub 점수
150

패키지 설치

flutter pub add flutter_device_emulator

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Flutter 디바이스 에뮬레이터는 개발자가 다양한 기기 화면 크기와 방향에서 Flutter 위젯을 실시간으로 미리 보는 데 도움을 주는 도구입니다. Android, iOS, 웹, macOS, Windows, Linux 등 여러 플랫폼을 지원하여 실제 장치 없이도 일관된 UI 테스트가 가능합니다. 이 패키지는 개발 워크플로우에 자연스럽게 통합되어 디자인 반복 과정에서 즉각적인 시각적 피드백을 제공합니다. 특히 반응형 레이아웃과 크로스 플랫폼 호환성을 보장하는 데 유용합니다.

사용 사례

  • 실시간 위젯 미리보기
  • 크로스 플랫폼 UI 테스트
  • 반응형 디자인 검증
  • 빠른 프로토타이핑
  • 디자인 일관성 검사
  • 화면 크기 시뮬레이션

주요 기능

  • 실시간 장치 미리보기
  • 다중 장치 템플릿
  • 모든 주요 플랫폼 지원
  • 실시간 레이아웃 업데이트
  • Flutter와의 간편한 통합
  • 방향 전환

적합한 대상

  • UI/UX 디자이너
  • Flutter 개발자
  • 크로스 플랫폼 앱 테스터
  • 프로토타이핑 팀
  • 프론트엔드 엔지니어

고려 사항

  • 일부 기능은 수동 설정이 필요합니다
  • 시각 미리보기만 가능 (런타임 상호작용 없음)
  • 저사양 기계에서 성능에 영향을 줄 수 있습니다
  • 물리적 장치 테스트의 대체가 아님
  • 내장된 테마 또는 로케일 시뮬레이션 없음

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

flutter_device_emulator

Pub Version License: MIT

A Flutter package to emulate different device screens and layouts, making it easier to preview and test your app on various device types and resolutions directly within your Flutter app or development environment.

flutter_device_emulator demo

Features

  • Emulate multiple device screen sizes and resolutions
  • Switch between device types (phone, tablet, etc.)
  • Preview your app in different orientations
  • Easy integration with your existing Flutter project
  • Customizable device frames and backgrounds

Installation

Add the following to your pubspec.yaml:

dependencies:
  flutter_device_emulator: latest_version

Then run:

flutter pub get

Usage

Import the package and wrap your app or widget with the emulator:

import 'package:flutter_device_emulator/flutter_device_emulator.dart';

DeviceEmulator(
  builder: (context) => SafeArea(child: HomePage()),
)
Example

See the example/ directory for a complete sample app demonstrating usage and available features.

API Reference

DeviceEmulator

The main widget to wrap your app for device emulation. Provides controls for device type, orientation, theme, and text direction.

Constructor:

DeviceEmulator({
  required WidgetBuilder builder,
  bool enableThemeToggle = true,
  bool enableOrientationToggle = true,
  bool enableLanguageToggle = true,
  Key? key,
})

Parameters:

  • builder (required): A function that builds the widget tree to be emulated inside the device frame.
  • enableThemeToggle (default: true): If true, shows a button to toggle between light and dark themes.
  • enableOrientationToggle (default: true): If true, shows a button to toggle between portrait and landscape orientations.
  • enableLanguageToggle (default: true): If true, shows a button to toggle between left-to-right and right-to-left text directions.
  • key: Optional widget key.

Features:

  • Device selector: Choose from a list of common devices to emulate.
  • Theme toggle: Switch between light and dark modes.
  • Orientation toggle: Switch between portrait and landscape.
  • Text direction toggle: Switch between LTR and RTL layouts.
  • Screenshot: Capture the current emulated screen (web only).

Example:

DeviceEmulator(
  builder: (context) => SafeArea(child: HomePage()),
)

For detailed API documentation, see the source code in lib/.

Contributing

Contributions are welcome! Please open issues or submit pull requests for bug fixes, features, or improvements.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a pull request

License

This project is licensed under the MIT License.

카테고리

의존성

의존성 목록 3 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.