Skip to content
pubscout

device_frame

1.4.0, released a year ago by aloisdeniel.com

Provides mock device frames to preview Flutter UI on various device screens.

WASM-ready
$ flutter pub add device_frame
Source repository

What it does

The package renders a visual frame that mimics real phones, tablets, and desktops around any widget. It also offers a virtual keyboard and media‑query/theme inheritance to simulate device conditions.

AI-written summary of version 1.4.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Testing UI on multiple device sizes without real hardware
  • Demonstrating app screenshots for marketing or documentation
  • Developing responsive layouts with accurate safe‑area insets

Skip it when

  • Running in production builds where the frame adds unnecessary UI overhead
  • Needing high‑performance rendering for animations

Strengths

  • Large library of pre‑defined devices
  • Simple API – just wrap your widget in DeviceFrame
  • Supports virtual keyboard and custom generic devices

Weaknesses

  • Only for preview – not meant for release builds
  • Adds extra widget layer which may affect performance in debug

Setup

Kind
Flutter widgets
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
1
DeviceFrame(
  device: Devices.ios.iPhone11,
  isFrameVisible: true,
  orientation: Orientation.portrait,
  screen: Container(
    color: Colors.blue,
    child: const Text('Hello'),
  ),
);

Alternatives

Packages that do the same job and could replace device_frame.

Works with

Packages commonly used together with device_frame: ones it builds on, ones built on it, and its own family.