perfect_flutter 0.1.34
perfect_flutter: ^0.1.34 copied to clipboard
DevTools-based pixel-perfect overlay for Flutter. Inject a design image overlay onto a running debug app from the DevTools panel — no widget wrapping, no app code changes.
Changelog #
0.1.34 #
- Add demo GIFs to README — feature showcase for inject + upload, follow scroll, opacity, and offset/scale/flip transforms.
0.1.33 #
- Fix repository URLs in
pubspec.yamland DevTools extensionconfig.yaml— they previously pointed atgithub.com/Hankium/perfect_flutter(underscore, doesn't exist). The actual repo isgithub.com/Hankium/perfect-flutter(dash).
0.1.32 #
Initial public release.
- One-import integration. Add
perfect_fluttertodev_dependenciesplus a singleimport 'package:perfect_flutter/perfect_flutter.dart';line in your app. No widget wrapping, norunAppchanges. - DevTools panel. Discoverable as the Perfect Flutter tab whenever
the consumer app declares the package in
dev_dependencies. - Image upload. Native file picker in the panel, chunked base64
transport (256 KB per
evaluatecall), validated for 1–5 MB PNG/JPG designs. - Transform controls. Opacity slider, scale as numeric ±5%, offset X/Y as numeric ±1 px, flip H/V toggles. All updates throttled via a latest-value-wins queue to keep the wire to one in-flight eval at a time.
- Display controls. Global show/hide; opt-in Follow scroll that re-picks the on-screen vertical scrollable every frame by visible-area on screen, so route changes and nested inner scrollables (dropdowns, tab inners) don't break tracking.
- Hot-restart resilience. Image bytes and transform values are
persisted to
localStorage; auto-restore replays them against the new isolate within ~2s, with a manual Restore button as fallback. - Hot reload from panel. ⚡ app-bar button calls
service.reloadSources; falls back to a friendly "pressrin your terminal" message when the kernel task is owned byflutter run. - Keyboard shortcuts for offset (Arrows / Shift+Arrows), opacity
(
[/]), scale (-/=), flip (h/v), show/hide (space). Discoverable via the keyboard icon in the app bar. - Release safety. Two layers: tree-shaking strips the unreachable
PerfectFlutterclass from release builds, and the VM service used by the panel doesn't exist in release builds anyway.
Stability fixes #
- Scheduler-phase safety for evals.
service.evaluatecan land in any scheduler phase, including mid-build/layout/paint. Notifier mutations during those phases causedListenableBuilderrebuilds to throw "Build scheduled during frame" —ChangeNotifierswallowed the throw insideFlutterError.reportError, so the eval looked successful to the panel but the overlay never rebuilt. All setters andOverlayState.insertnow route through a_safeApplyhelper that defers to the next post-frame callback when the current phase isn't safe. - Transform queue timeout + reset.
LatestValueQueuenow timeouts a hung eval after 3s (e.g. paused isolate, transient disconnect) and releases the in-flight flag in afinallyblock. Added areset()method so isolate swaps don't leave the queue holding a Future from a dead connection.
0.0.1 #
- Initial scaffold. DevTools extension panel discoverable from a consuming app (hello world panel showing isolate info).