Skip to content
CAI
Software that uses CAICheck a score

aloisdeniel/flutter_device_preview

59.5

Adequate · 13 November 2026

224k

lines of production code

JavaScript

with Dart

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Flutter development toolkit comprising Device Preview and Device Frame packages that simulate device characteristics at the engine level rather than through UI wrappers. It provides accurate previews of screen metrics, safe areas, and system UI by extracting specifications directly from iOS and Android emulators. The system integrates with Flutter DevTools for programmatic control and includes tooling to automate device catalog generation and release validation.

Features

Automated device spec extraction from iOS and Android simulators

Added new skills to automatically rebuild Apple and Google Pixel device specifications by extracting frame artwork, screen geometry, and safe areas directly from the locally installed iOS Simulator and Android emulator. The new \extract-cupertino-specs\ and \extract-pixel-specs\ tools use static simulator assets (Xcode bezel chrome and Android device skins) for visual frames and run live probes to capture runtime metrics like safe areas and software keyboard heights, ensuring specs match the actual behavior of the emulated devices.

.claude · high confidence

Device Preview 3.0: Binding-level simulation with DevTools integration

Device Preview has been re-architected from a UI wrapper into a binding-level simulation that intercepts framework services (platform dispatcher, view configuration, service extensions) to simulate device characteristics like screen metrics, safe areas, locale, and accessibility flags without injecting in-app UI. The package now includes a pre-compiled Flutter DevTools extension for programmatic control, a new device catalog structure using JSON specs for artwork and metrics, and a dedicated workspace configuration for the monorepo layout.

(repo-wide) · high confidence

Initial release of the device\_frame example app

The device\_frame/example directory now includes a complete example application (main.dart) that demonstrates the library's capabilities. This app allows users to interactively preview device frames by switching between different device models via a scrollable tab bar, toggling the frame visibility, changing the theme style (dark/light), and rotating the orientation between portrait and landscape. It also features a virtual keyboard toggle and a simulated screen that displays real-time device metrics such as platform, size, pixel ratio, padding, and view insets, providing a practical reference for integrating device frames into Flutter applications.

_device\frame/example · high confidence

Initial release of the device\_frame package

The \device\_frame\ package is introduced, providing mockups for common devices to wrap widgets in simulated device frames. It includes a \DeviceFrame\ widget for displaying devices in various orientations, support for a simulated virtual keyboard via \VirtualKeyboard\, and the ability to maintain device-specific \MediaQuery\ and theme data within encapsulated apps. The package ships with a predefined list of iOS, Android, Windows, macOS, and Linux devices, along with factories for creating custom generic devices.

_device\frame · high confidence

New tooling scripts for building demos and validating releases

Added four new scripts in the \tool/\ directory to streamline the development and release process for the device\_preview package. \build\_demo.sh\ automates the generation of the device catalog and builds the interactive landing-page demo for the web, optimizing the output for GitHub Pages hosting. \build\_devtools\_extension.sh\ rebuilds and copies the DevTools extension web app into the package's extension directory. \check\_release.sh\ serves as a pre-publish gate, verifying version consistency, ensuring the DevTools extension build is present and committed, and running analyzers and tests for both the main package and the DevTools extension. \generate\_demo\_catalog.dart\ creates the \docs/device\_catalog.json\ file by bundling individual device specification JSON files, which is used by the landing page's demo panel to simulate device frames.

tool · high confidence

Behavioural changes

Device Preview 3.0: Engine-level simulation replaces widget wrapper

Device Preview has been rebuilt from scratch to simulate device characteristics (screen metrics, safe areas, orientation, folds, keyboard insets, locales, brightness, text scale, accessibility flags, and target platform) at the engine-abstraction level rather than wrapping the app in a widget. This allows a single-line integration (\DevicePreview.enable()\) with zero footprint in release builds, while ensuring that safe areas, hit-testing, locale resolution, and accessibility flags behave exactly as they do on a real device, including for third-party packages. The in-app toolbar is gone; control is now provided via a Flutter DevTools extension, the \DevicePreview.controller\ API, or a \DevicePreviewBindingMixin\ for widget tests. The bundled device catalog (33 devices) is now generated from real iOS Simulator and Android emulator specs, including frame artwork and system UI, and supports foldable devices with hinge-aware layouts.

_device\preview · high confidence

Device Preview DevTools extension rebuilt for v3.0 with new device catalog and JSON import

The DevTools extension has been updated to version 3.0.0, featuring a rebuilt architecture that communicates with the inspected app via VM service extensions. The device catalog is now generated locally from JSON specs, allowing the panel to list devices with artwork even before an app is attached. New capabilities include importing custom devices via JSON, simulating software keyboards, and displaying simulated system bars that follow the device's platform. The device presets have been refreshed to match the latest iOS and Android simulator line-ups, including new foldable device presets.

_device\_preview\_devtools\extension · high confidence

Redesigned example app with landing-page demo integration

The example application has been completely redesigned to serve as the interactive demo for the package's landing page. It now includes a new demo bridge that connects the simulation controller to the HTML panel via window.postMessage, allowing the landing page to control the preview. The example features three distinct demo apps: a standard counter app, a showcase app demonstrating localization, safe areas, and foldable device support, and a todo app exercising keyboard insets and navigation. These demos are bundled together and selected via URL parameters, providing a comprehensive visual test of device\_preview's capabilities directly on the documentation site.

_device\preview/example · high confidence

Updated Android example app for Flutter v2 embedding and null-safety

The Android example application has been migrated to use Flutter's v2 embedding, requiring new AndroidManifest.xml files that declare the \flutterEmbedding\ meta-data and updated MainActivity.kt extending \FlutterActivity\. The project also includes standard Android resource updates for launch themes and splash screens, along with debug/profile manifest entries for internet permissions, ensuring the example runs correctly on modern Flutter versions.

_device\preview/example/android · high confidence

Dependencies

Updated example apps and dependencies for Flutter 3.47+ and Android Gradle Plugin 9.0

The example applications for device\_frame and device\_preview have been migrated to modern build configurations, including Kotlin DSL Gradle files and Android Gradle Plugin 9.0.1. The device\_preview package now targets Flutter SDK \>=3.47.0 and Dart \>=3.8.0, with dev dependencies updated to flutter\_lints ^6.0.0 and vm\_service ^15.0.0. The device\_frame package targets Flutter \>=3.2.0 and Dart \>=3.4.0, using freezed ^3.0.0 and freezed\_annotation ^3.0.0. The device\_preview\_devtools\_extension targets Flutter \>=3.27.1 and uses devtools\_extensions ^0.5.1.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 55 → 59 (+4.4)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 96 → 96 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 56 → 71 (+15.3)
  • Readiness 28 → 29 (+1.0)
  • Security 100 → 100 (+0.0)
  • Performance 100 → 100 (+0.0)

Resolved (2)

  • No ADRs found
  • Off-boarding risk: anonymized user #1

New (16)

  • Edited copies of one member (4 members, 20+ corresponding lines) (device_frame/lib/src/info/info.dart)
  • Edited copy of a member (10 corresponding lines) (device_frame/example/macos/Runner/MainFlutterWindow.swift)
  • Edited copy of a member (10 corresponding lines) (device_preview/example/lib/main.dart)
  • Edited copy of a member (10 corresponding lines) (device_preview/lib/src/svg/svg_path_data.dart)
  • Edited copy of a member (11 corresponding lines) (device_preview/example/lib/counter.dart)
  • Edited copy of a member (11 corresponding lines) (device_preview/lib/src/widgets/device_preview_frame.dart)
  • Edited copy of a member (12 corresponding lines) (device_preview/lib/src/model/system_ui.dart)
  • Edited copy of a member (3 corresponding lines) (device_preview/lib/src/service/protocol.dart)
  • Edited copy of a member (5 corresponding lines) (device_preview/lib/src/widgets/device_preview_frame.dart)
  • Edited copy of a member (6 corresponding lines) (device_frame/example/ios/Runner/AppDelegate.swift)
  • Edited copy of a member (6 corresponding lines) (device_frame/lib/src/devices/generic/desktop_monitor/frame.dart)
  • Edited copy of a member (8 corresponding lines) (device_preview/example/lib/todo.dart)
  • Edited copy of a member (8 corresponding lines) (device_preview/example/lib/todo.dart)
  • Edited copy of a member (9 corresponding lines) (device_frame/lib/src/devices/generic/desktop_monitor/frame.dart)
  • No ADRs found (device_preview_devtools_extension/lib/main.dart)
  • Off-boarding risk: anonymized user #1

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

aloisdeniel/flutter_device_preview was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit ee630a9de852f2520d395f61abb4b9d0a902d807 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.57+preprod-8ebfb01cf4c0.