Skip to content
pubscout

device_preview_plus

2.9.9, released 3 weeks ago by an unverified publisher

Simulates how a Flutter app looks and behaves on various devices and configurations.

WASM-ready
$ flutter pub add device_preview_plus
Source repository

What it does

Provides a widget that wraps your app to emulate different screen sizes, orientations, locales, and system settings. It keeps the app state and offers plugin hooks for screenshots and file exploration.

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

Use it when

  • Testing UI on multiple device form factors without physical devices
  • Demonstrating app appearance to stakeholders during development

Skip it when

  • Need precise performance metrics from real hardware
  • Testing platform-specific native features

Strengths

  • Fast visual feedback across many device profiles
  • Keeps app state while switching devices
  • Extensible via plugins

Weaknesses

  • Cannot replace testing on actual devices for performance or native behavior
  • Limited to UI simulation, not full device capabilities

Setup

Kind
Flutter widgets
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
8
import 'package:device_preview_plus/device_preview_plus.dart';

void main() => runApp(
  DevicePreview(
    enabled: !kReleaseMode,
    builder: (context) => MyApp(),
  ),
);

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      useInheritedMediaQuery: true,
      locale: DevicePreview.locale(context),
      builder: DevicePreview.appBuilder,
      home: const Scaffold(body: Center(child: Text('Hello'))),
    );
  }
}

Alternatives

Packages that do the same job and could replace device_preview_plus.

Works with

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