A changed screenshot is a question to investigate. Approving a replacement baseline should follow an explanation of the changed pixels.

Freeze the comparison conditions

Record SDK revision, host platform, viewport, pixel ratio, locale, text scaling, theme and fonts. Keep test data and captured state alongside the record. If these inputs changed together, a visual difference cannot yet be attributed to the patch.

Flutter’s golden matcher compares an image with a reference. Its API documents font-related variation across platforms and Flutter versions. A green comparison supports that image and environment, not every device.

Read the difference in three passes

  1. Compare full reference and candidate images to locate changed regions.
  2. Inspect each region in context: text, spacing, clipping, colour, images and focus.
  3. Explain the cause as intended change, environment mismatch or unresolved defect.

Preserve the original, candidate and difference view for another reviewer. Check actual rendered content when an image is blank. An empty capture can match another empty capture while proving little about the intended screen.

Visual difference ledger
RegionSynthetic observationDecision
HeadlineAll glyph widths shiftedCheck font and environment
ErrorNew required text wrapsReview layout and clipping
ActionControl disappearedInvestigate before accepting

Separate baseline updates from fixes

Suppose a synthetic patch intentionally changes one error message. That message and required spacing should be expected to differ. If the whole page shifts, investigate the additional change rather than approving it under the same explanation.

The documented flutter test --update-goldens operation writes reference files. Use it only after reviewing the intended change in the appropriate working copy. Inspect the resulting diff before retaining it. No sample reference is pre-approved by this guide.

Check what screenshots cannot establish

A reference image does not show whether keyboard activation works, a label reaches the semantics tree or a value survives restart. Pair the image with behavioural assertions required by the feature.

For every accepted region record the reason, decision, reference identity and environment. For unexplained changes record the next investigation. A candidate using another renderer or platform deserves a separate comparison, not a silent replacement of the established baseline.

Name the state represented by each reference and retain its test data. A future reviewer should understand why it exists without reconstructing an entire pull request. Keep a narrow capture where it helps identify the component, but also review enough surrounding context to catch content hidden by an ancestor or an unexpected layout change.

Visual procedure

Reference + environment; then Candidate + same inputs; then Explain changed regions; then Accept intended changes
Original illustration by Flock editorial: Distinguish an intended design change from changed fonts, environment or SDK before updating a visual baseline.

Reference + environment; then Candidate + same inputs; then Explain changed regions; then Accept intended changes. This is an explanatory illustration, not a test result.

Primary sources

Next useful step

Find your next step

Browse the full sitemap