PackageTrack
Sign in Get early access

device_preview

Approximate how your Flutter app looks and performs on another device.

1.3.1 194K downloads/mo #862 most downloaded on pub.dev aloisdeniel/flutter_device_preview

What this package is like to depend on

Last release 2 days ago

21 Aug 2026

Ships unpredictably

gaps range from 8 days to 2.0 years

Nearly every release is documented

notes for 35 of 36 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

86 releases · first in 2019

7 releases in the last 12 months

see the full history below

Release timeline

86 releases · May 2019 to Aug 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 86
  1. 3.0.0-prerelease7 21 Aug 2026 pre-release
    Release notes

    device_preview 3.0.0-prerelease7

    Open source →
    Release notes

    The 3.0 candidate — a from-scratch rebuild of Device Preview, feature-complete and awaiting field feedback before the stable release. If you are coming from 2.x, see Migrating from 2.x in the README: the integration is now a single line and the in-app toolbar is gone.

    The one-paragraph version: a custom WidgetsBinding simulates device characteristics (screen metrics, safe areas, orientation, folds, keyboard insets, locales, brightness, text scale, accessibility flags, 24-hour time, target platform) at the engine-abstraction level, so your app reads them through the same MediaQuery, layout and locale-resolution paths it uses on a real device — no widget wrapper, no in-app UI, nothing shipped in release builds. The simulation is driven from the bundled Flutter DevTools extension, from Dart through DevicePreview.controller, or from widget tests via DevicePreviewBindingMixin.

    Highlights, relative to 2.x:

    • One-line integration: DevicePreview.enable(); runApp(MyApp()); — no builder wrapper, no useInheritedMediaQuery, no locale/builder glue on your MaterialApp. Off in release builds by default, with zero footprint.
    • Full framework fidelity: because the simulation sits below the widget layer, safe areas, hit-testing, locale resolution, text scaling and accessibility flags behave exactly as they do on device — including third-party packages that never heard of Device Preview.
    • The UI moved to DevTools: a device picker with framed previews, locale and accessibility controls, orientation, text scale, dark mode, a screenshot button, and a "New device from JSON…" entry that saves custom devices in the browser.
    • Programmatic + test control: applyPreset, setOrientation, update(copyWith), applyJson, registerPreset, reset — and the same simulation in widget tests for golden matrices over many devices.
    • A rebuilt device catalog (33 devices): every Apple frame and metric is extracted from the real iOS Simulator (Xcode 26.6 / iOS 26.5) and the Pixels from the official Android emulator skins (Android 16), artwork included; four foldables report their hinge as a display feature; generic phone/tablet/desktop windows round it out. Presets carry their frame and simulated system UI and tree-shake away when unreferenced.
    • Device frames & system UI in-app too: applyPreset shows the framed device with a live-tinted status bar and gesture pill even without DevTools attached (goldens, CI), painted over the default DotGridDecoration letterbox.
    • Touch input simulation: the mouse is reported to the app as a finger on touch devices (auto by default), so drags scroll and gestures take their touch paths.
    • A simulated software keyboard: every device carries the height its keyboard covers, per orientation — probed from its own simulator for the iPhones and iPads, one shared default for the Android devices, whose keyboard height belongs to the installed IME — and one switch in DevTools (or DeviceSimulation.keyboardInset from Dart) raises it. It arrives as MediaQuery.viewInsets.bottom, so resizeToAvoidBottomInset, scroll-into-view and the collapsing bottom safe area all behave as they do on the device — which is how a form gets checked against the keyboard from a desktop that has none. While a device is simulated it is also the only keyboard the app sees: the host's own keyboard inset is no longer mapped into the simulated screen, where it stood for a length of the wrong display.
    • The simulated system bars now follow the simulated device's operating system, not the host's: SystemUiSimulation.platform (stamped from the preset by DevicePreset.resolve and by the DevTools panel) decides the platform-specific paint behavior, so an app running on an Android host no longer tints a simulated iPhone's status bar and home-indicator band with its Android SystemUiOverlayStyle background colors.

    Breaking (from the prereleases, for completeness): DevicePreview.enable's flag is the named enabled parameter; iPad preset ids/names carry their chip (iPadPro11M4, …); minimum Flutter is 3.47.0 / Dart 3.8.

    Open source →
  2. 3.0.0-prerelease6 19 Aug 2026 pre-release
    Release notes

    Rebuilds the bundled DevTools extension so the panel ships the dark-grey
    iPhone SE home button.

    Co-Authored-By: Claude Fable 5 [email protected]
    Claude-Session: https://claude.ai/code/session_01Dj2sLPEMBaQavFfSHsyG7M

    Open source →
    Release notes
    • The iPhone SE (3rd gen) home button ring is now a dark grey instead of the white Xcode strokes it with, so it no longer glows against the dark letterbox.
    Open source →
  3. 3.0.0-prerelease5 19 Aug 2026 pre-release
    Release notes Open source →
    Release notes
    • The built-in DevicePresets are now generated from the shared device spec catalog (device_specs/ at the repository root) and carry the complete spec — frame artwork and system UI included — identical to what the DevTools panel pushes. applyPreset therefore shows the framed device without DevTools attached (golden tests, CI). Every preset keeps its name and id; unreferenced presets still tree-shake away, artwork included. Regenerate with dart run tool/generate_presets.dart after editing a spec (a guard test fails when the checked-in catalog is stale).
    • The area around the simulated device is now painted by default with the new DotGridDecoration: a dark grey with a subtle dot pattern (in real pixels, so its density does not change with the device or the fit scale), which keeps dark device bodies readable where the engine's plain black swallowed them. DevicePreview.enable's backgroundDecoration now accepts any Decoration (not only BoxDecoration), is painted in real logical pixels, and null now explicitly leaves the area unpainted.
    • New DevicePreviewController.applyJson(json): decodes a device spec (a JSON string or map in the device_specs/*.json / DevicePreset.toJson() format, frame artwork and system UI included), registers it as a preset and applies it.
    • DevTools: the device picker gains a "New device from JSON…" entry. Pasted specs are validated, applied immediately, saved in the browser and listed under "My devices" in later sessions (with a remove button).
    • The Apple catalog now mirrors the iOS 26.5 simulator line-up (21 devices, 33 in all), every one derived from its real simulator: added iPhone 17 Pro Max, iPhone SE (3rd gen) — back as DevicePresets.iPhoneSe3, with the Home-button chassis, a 20 pt status bar and no other safe area — iPad Pro 11"/13" (M5), iPad Air 11"/13" (M2) and (M4), iPad (A16) and iPad (10th gen). The iPad Airs' M3 entries became the M4 generation (same chassis and metrics). Removed iPhone 16e (DevicePresets.iPhone16e), which Xcode no longer offers as an iOS 26.5 destination.
    • Breaking: the iPad ids and preset names now carry their chip so the generations can coexist: apple-ipad-pro-11apple-ipad-pro-11-m4 (DevicePresets.iPadPro11M4), apple-ipad-air-11apple-ipad-air-11-m4 (iPadAir11M4), and likewise for the 13" models; apple-ipad-mini keeps its id but is named "iPad mini (A17 Pro)".
    Open source →
  4. 3.0.0-prerelease4 19 Aug 2026 pre-release
    Release notes

    device_preview 3.0.0-prerelease4

    Open source →
    Release notes
    • The iPhone and iPad frames are now derived from the official iOS Simulator bezel artwork (Xcode's "Show Device Bezels" chrome): exact body sizes, bezel borders, Apple's own outer corner radii, and the true continuous-curvature display outlines from the simulator framebuffer masks, notch and Dynamic Island included. See .claude/skills/extract-cupertino-specs/ for the extraction process.
    • Apple metrics are now verified against a live simulator: a probe app is booted per device type and reports the safe areas UIKit actually applies. The iPhone values were confirmed exact; every iPad's bottom safe-area inset was corrected from 20 to 25 logical pixels (both orientations), in the specs and the built-in DevicePresets.
    • Every Apple device in the catalog now has its own real simulator (Xcode 26.6 device profiles, probed on iOS 26.5): the iPhone 16e, 17, 17 Pro, 17e and Air no longer borrow another model's artwork or hand-modelled metrics — the 16e/17e notch outline and the Air's squircle come from Apple's own framebuffer masks, and the iPad Airs use the M3 chassis (59 pt bezel). Safe areas follow iOS 26: every iPad's top inset is 32 (was 24), landscape iPhones report a 20 pt bottom inset (was 21), and the iPhone Air's Dynamic Island band is 68 (was 62). Specs, DevicePresets, fixtures and the bundled catalog updated together.
    • The Google Pixel specs are now derived the same way, by an Android counterpart skill (.claude/skills/extract-pixel-specs/): frame artwork, screen shape and the camera punch-hole cutout come from the official emulator device skins (Android Studio 2026.1), and the metrics from a booted Android 16 emulator. Pixel 9/10 sizes are now the exact 411.43×923.43 a device reports (was the rounded 412×923), the fold is 851.69×882.87 with its crease recentred accordingly, and the safe areas match today's Android 16 system bars — including its taller status bar (54 dp portrait / 52 landscape on the slabs; 36/56 on the fold, bottom 24 and 32 respectively). Specs, built-in DevicePresets and the bundled catalog all updated together; the frames now show each device's punch hole (top-centre on the slabs, top-right on the fold's inner display).
    • Compatibility with Flutter 3.47: PreviewPlatformDispatcher forwards the new PlatformDispatcher.onHitTest callback. The minimum Flutter version is now 3.47.0.
    • Four foldable presets — the catalog's first: Pixel 10 Pro Fold (DevicePresets.pixel10ProFold), Galaxy Z Fold8 (galaxyZFold8), Galaxy Z Fold8 Ultra (galaxyZFold8Ultra) and Galaxy Z Flip8 (galaxyZFlip8), 26 devices in all. Each simulates its unfolded inner display and reports the crease as a fold display feature (postureFlat), so hinge-aware layouts such as two-pane split at the fold, in both orientations.
    • package:device_preview/presets.dart now re-exports SimulatedDisplayFeature, which the foldable presets carry.
    Open source →
  5. 3.0.0-prerelease3 08 Aug 2026 pre-release
    Release notes Open source →
    Release notes
    • DevicePreview.enable gained padding and backgroundDecoration parameters: padding reserves room around the simulated device when it is fitted into the real window, and backgroundDecoration paints the window behind the device (the letterbox). Both are latched at enable time, like enabled.
    • The safe areas of the hosting platform (a real notch, status bar, or home indicator) are now automatically added to the padding, so the simulated device stays clear of the host's own system UI.
    • Breaking: DevicePreview.enable's positional flag became the named enabled parameter — DevicePreview.enable(kDebugMode) is now DevicePreview.enable(enabled: kDebugMode).
    • The example gained a "device lab" showcase app (example/lib/showcase.dart) that makes every simulated characteristic visible: labeled safe-area bands, a locale- and 24-hour-aware clock, a hinge-aware two-pane layout, and an animation that honors disableAnimations.
    Open source →
  6. 3.0.0-prerelease2 07 Aug 2026 pre-release
    Release notes

    Device catalog refreshed to the two latest generations — 22 devices:

    • Added iPhone 16 Plus and iPhone 16e (completing the 16 line), iPad Pro 11", iPad Air 11" and 13", Pixel 10, Galaxy S25, and the Galaxy Tab S10+ and Tab S11 tablets.
    • Removed iPhone SE (3rd gen) (DevicePresets.iPhoneSe3), Pixel 8 (DevicePresets.pixel8) and Pixel Tablet (DevicePresets.pixelTablet); the generic desktop windows remain. Apps that referenced the removed presets can keep the metrics as custom DevicePresets via registerPreset.
    • The bundled DevTools extension ships the matching regenerated catalog (frame artwork included) for every device above.
    Open source →
  7. 3.0.0-prerelease1 07 Aug 2026 pre-release
    Release notes

    device_preview 3.0.0-prerelease1 — binding-level simulation rebuild, …

    Open source →
    Release notes

    The 3.0 release is a from-scratch rebuild: a custom WidgetsBinding that simulates device characteristics (screen metrics, safe areas, locale, brightness, text scale, accessibility flags, target platform) at the engine-abstraction level. There is no in-app UI — the simulation is driven programmatically through DevicePreview.controller and from the bundled Flutter DevTools extension. See the README for the full feature tour and the 2.x migration notes, and the 3.0.0-dev.* entries below for the rebuild's incremental history.

    Changes since 3.0.0-dev.2:

    • DevicePreviewBindingMixin.latchConfiguration is now sentinel-based: DevicePreview.enable() after latchConfiguration(initialSimulation: ...) no longer silently discards the latched simulation (the documented golden/CI startup sequence).
    • setOrientation keeps the active frame and systemUi artwork when the simulation was pushed from DevTools (rotation is not a device switch).
    • applyPreset and setOrientation now preserve touchInput and showSystemUi, matching the DevTools panel's definition of device-switch-surviving overrides.
    • Simulated MediaQuery.padding now collapses where the real keyboard's viewInsets overlap it, matching real engine behavior.
    • SVG artwork: fill="currentColor" now follows the paint-time tint (the app's SystemUiOverlayStyle) even nested under groups with an explicit or none fill, per CSS currentColor semantics.
    • DevTools panel: landscape viewPadding now falls back through landscapePadding exactly like DevicePreset.resolve, so DevTools and applyPreset produce identical metrics for every catalog device.
    • DevTools panel: a rejected payload (invalidParams) no longer flips the panel to the "isolate paused" empty state; the panel re-fetches the app's actual state instead.
    • DevTools panel: the in-memory simulation stash is cleared on disconnect, so a previous app's simulation is never pushed into a different app on reconnect (the persisted stash stays keyed per VM-service URI).
    • New test layers: a VM-service e2e smoke over the real service-extension glue (tool/check_release.sh runs it), a production-composition host-resize seam test, and screenshot capture tests.
    Open source →
  8. 1.3.1 30 Jun 2025
    Release notes
    • Adds padding property to DevicePreview to allow custom padding around the device frame.
    Open source →
  9. 1.3.0 30 Jun 2025
    Release notes
    • Updated dependencies and adding support for Flutter 3.32.
    Open source →
  10. 1.2.0 27 May 2024
    Release notes
    • Updated dependencies and adding support for Flutter 3.2.
    Open source →
  11. 1.1.0 24 May 2022
    Release notes
    • Updated dependencies and adding support for Flutter 3.0.
    Open source →
  12. 1.0.0 01 Dec 2021

    Nothing published for this version

  13. 1.0.0-alpha.15 13 Nov 2021 pre-release
    Release notes
    • Updated device_frame which added new android devices and fixed padding.
    Open source →
  14. 1.0.0-alpha.14 12 Nov 2021 pre-release
    Release notes
    • Missing export of DeviceScreenshot.
    Open source →
  15. 1.0.0-alpha.13 12 Nov 2021 pre-release
    Release notes
    • Added device type section headers
    • Improved disabled item icon visibility changes.
    • Fixed accesible navigation, invert colors and bold text not available.
    • Removed path_drawing dependency.
    Open source →
  16. 1.0.0-alpha.12 10 Nov 2021 pre-release
    Release notes
    • Updated device_frame which added a new list of devices.
    Open source →
  17. 1.0.0-alpha.10 02 Nov 2021 pre-release
    Release notes
    • Added conditional import for web, to improve the pub.dev score.
    Open source →
  18. 1.0.0-alpha.9 02 Nov 2021 pre-release

    Nothing published for this version

  19. 1.0.0-alpha.8 01 Nov 2021 pre-release
    Release notes
    • Removed generated files from example.
    Open source →
  20. 1.0.0-alpha.7 01 Nov 2021 pre-release
    Release notes
    • Fixed enabled issue.
    • Fixed SVG issue with custom device.
    Open source →
  21. 1.0.0-alpha.6 01 Nov 2021 pre-release
    Release notes
    • Upgraded device_frame dependency.
    • Fixed theming issues in small layout.
    Open source →
  22. 1.0.0-alpha.5 31 Oct 2021 pre-release
    Release notes
    • Added DevicePreview.selectedDevice method.
    Open source →
  23. 1.0.0-alpha.4 31 Oct 2021 pre-release
    Release notes
    • Added DevicePreview.availableDeviceIdentifiers method.
    Open source →
  24. 1.0.0-alpha.3 31 Oct 2021 pre-release
    Release notes
    • Upgraded device_frame dependency.
    Open source →
  25. 1.0.0-alpha.2 28 Oct 2021 pre-release
    Release notes
    • Upgraded provider dependency.
    Open source →
  26. 1.0.0-alpha.1 28 Oct 2021 pre-release
    Release notes
    • Adaptative layout to make the tool easier to use on mobile.
    • Big refactor to make the package more maintainable :
      • Switched all UI components to Material design
      • Removed all include plugins (available soon as separated packages)
    Open source →
  27. 0.8.0 25 Oct 2021
    Release notes
    • Removed DevicePreview.appBuilder to switch to newer useInheritedMediaQuery property instead.
    Open source →
  28. 0.7.5 25 Oct 2021
    Release notes
    • Upgraded dependencies
    • Migrated to flutter_lints
    • Removed dependency to awesome_fonts
    Open source →
  29. 0.7.4 05 Jul 2021
    Release notes
    • Fixing basicLocaleListResolution throwing imported from multiple packages conflict error.
    Open source →
  30. 0.7.3 25 May 2021
    Release notes
    • Fixing missing part file.
    Open source →
  31. 0.7.2 25 May 2021
    Release notes
    • Upgraded dependencies.
    • Fixed issue on web with null empty locale list.
    Open source →
  32. 0.7.1 15 Mar 2021
    Release notes
    • Fixed screenshot error.
    • Fixed initialization null check.
    Open source →
  33. 0.7.0 15 Mar 2021
    Release notes
    • Null-safety compatibility.
    • Upgraded dependencies for Flutter 2.0.
    Open source →
  34. 0.6.2-beta 27 Nov 2020 pre-release
    Release notes
    • Added Directionality to overlay.
    Open source →
  35. 0.6.1-beta 27 Nov 2020 pre-release
    Release notes
    • Added styling options to hide toolbar buttons.
    • Added a defaultDevice.
    Open source →
  36. 0.6.0-beta 26 Nov 2020 pre-release
    Release notes
    • Support for MediaQuery.maybeOf Flutter API breaking change.
    Open source →
  37. 0.5.5 19 Nov 2020
    Release notes
    • Fixed an issue with language picker.
    Open source →
  38. 0.5.4 12 Nov 2020
    Release notes
    • Fixed issue with [DevicePreview.selectDevice] method.
    Open source →
  39. 0.5.3 12 Nov 2020
    Release notes
    • Added the [DevicePreview.selectDevice] method.
    Open source →
  40. 0.5.2 11 Nov 2020
    Release notes
    • Removed Flutter plugin directories.
    Open source →
  41. 0.5.1 11 Nov 2020
    Release notes
    • Fixed linting issues.
    Open source →
  42. 0.5.0 11 Nov 2020
    Release notes
    • Updated documentation
    Open source →
  43. 0.5.0-prerelease.16 15 Oct 2020 pre-release
    Release notes
    • Fix shared preferences plugin navigation restoration issues.
    Open source →
  44. 0.5.0-prerelease.15 15 Oct 2020 pre-release
    Release notes
    • Fix styling issues.
    Open source →
  45. 0.5.0-prerelease.14 15 Oct 2020 pre-release
    Release notes
    • Fix issue when not enabled.
    Open source →
  46. 0.5.0-prerelease.13 15 Oct 2020 pre-release
    Release notes
    • Fixed several styling issues.
    • Fix issue when not enabled.
    Open source →
  47. 0.5.0-prerelease.12 15 Oct 2020 pre-release
    Release notes
    • Added the plugin system.
    Open source →
  48. 0.5.0-prerelease.11 09 Oct 2020 pre-release
    Release notes
    • Fixed device screen clip.
    Open source →
  49. 0.5.0-prerelease.10 08 Oct 2020 pre-release

    Nothing published for this version

  50. 0.5.0-prerelease.9 08 Oct 2020 pre-release

    Nothing published for this version

  51. 0.5.0-prerelease.8 08 Oct 2020 pre-release

    Nothing published for this version

  52. 0.5.0-prerelease.7 08 Oct 2020 pre-release

    Nothing published for this version

  53. 0.5.0-prerelease.6 08 Oct 2020 pre-release
    Release notes
    • Fixed hidden popovers when not fullscreen.
    • Fixed overflow errors.
    Open source →
  54. 0.5.0-prerelease.5 07 Oct 2020 pre-release
    Release notes
    • Improved loading time.
    Open source →
  55. 0.5.0-prerelease.4 07 Oct 2020 pre-release
    Release notes
    • Keeping state of application when enabling/disabling preview.
    Open source →
  56. 0.5.0-prerelease.3 07 Oct 2020 pre-release
    Release notes
    • Custom device selector.
    Open source →
  57. 0.5.0-prerelease.2 06 Oct 2020 pre-release
    Release notes
    • Added linux devices.
    Open source →
  58. 0.5.0-prerelease 05 Oct 2020 pre-release
    Release notes
    • New redesigned frames.
    • Added enabled switch.
    • Removed restart button
    • Fixed issues with conflicting global key.
    • Minor UI tweaks.
    Open source →
  59. 0.4.8 17 Aug 2020
    Release notes
    • Fixed issues with MaterialLocalization.
    • Added copy to clipboard for image links.
    Open source →
  60. 0.4.7 10 Jul 2020
    Release notes
    • Upgraded freezed dependencies.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive