Skip to content
pubscout

pixel_perfect

1.1.3, released 4 years ago by kherel.com

Puts a semi-transparent design image over the developed layout to compare original design and code.

WASM-ready
$ flutter pub add pixel_perfect
Source repository

What it does

Allows developers to overlay a semi-transparent design mockup image on top of their Flutter widget hierarchy. Provides controls for opacity, positioning, and scaling to easily align and compare the layout against the intended design.

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

Use it when

  • You are implementing UI designs and need to ensure exact visual fidelity
  • You want to compare your Flutter app layout directly against a designer's mockup

Skip it when

  • In production builds where design overlays are not needed
  • When building non-visual backend or utility packages

Strengths

  • Simple widget-based integration
  • Supports customizable initial opacity, bottom positioning, and offset
  • Includes an extended constructor for custom image providers

Weaknesses

  • Primarily a development tool and should be removed or disabled in production

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Add the package to dependencies and ensure design images are included in your pubspec.yaml assets.

return PixelPerfect(
  assetPath: 'assets/design.png',
  scale: 1,
  initBottom: 20,
  offset: Offset.zero,
  initOpacity: 0.4,
  child: Scaffold(
    body: Container(),
  ),
);

Alternatives

Packages that do the same job and could replace pixel_perfect.

  • device_preview

    If you want to preview your app across different screen sizes, orientations, and text scales rather than just overlaying a design image.