NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #2109 most downloaded on pub.dev
Utilities to automate screenshot generation using Flutter's golden tests.
Last release 6 days ago
02 Oct 2026
Release timing varies
gaps range from 8 days to 5 months
Most releases are documented
notes for 50 of 56 stable releases
2 versions withdrawn
withdrawn after publishing
2 years old
58 releases · first in 2024
One column per month.
Fixed dart run golden_screenshot:download_apple_fonts not working after Apple changed the archive format.
dart run golden_screenshot:download_apple_fonts not working after Apple changed the archive format.Better golden image comparison algorithm:
Better golden image comparison algorithm:
Flutter previously counted the number of pixels that changed, even if they only changed a little bit.
We now take the root mean square error of each pixel, so small per-pixel rendering differences count less than larger changes.
If you provide your own allowedDiffPercent,
you can probably reduce it now due to the new and more accurate metric.
Reduced noise when updating goldens:
Running flutter test --update-goldens will only update goldens that exceed the allowedDiffPercent (default 1%).
This means you have to commit new goldens less often, and improves portability across different development platforms.
Reduced the default allowedDiffPercent from 10% to 1% (fixes #11)
allowedDiffPercent from 10% to 1% (fixes #11)Migrated to material_ui as the decoupled Material library from Flutter 3.47.0.
material_ui as the decoupled Material library from Flutter 3.47.0.Backports from 12.1.1 for those who can't move to material_ui yet:
Backports from 12.1.1 for those who can't move to material_ui yet:
dart run golden_screenshot:download_apple_fonts not working after Apple changed the archive format.Backports from 12.1.0 for those who can't move to material_ui yet:
Backports from 12.1.0 for those who can't move to material_ui yet:
Bumped the minimum Flutter version to 3.47.0.
Reduced the default allowedDiffPercent from 10% to 1% (fixes #11)
Better golden image comparison algorithm:
Flutter previously counted the number of pixels that changed, even if they only changed a little bit.
We now take the root mean square error of each pixel, so small per-pixel rendering differences count less than larger changes.
If you provide your own allowedDiffPercent,
you can probably reduce it now due to the new and more accurate metric.
Reduced noise when updating goldens:
Running flutter test --update-goldens will only update goldens that exceed the allowedDiffPercent (default 1%).
This means you have to commit new goldens less often, and improves portability across different development platforms.
Fixed the titlebar's font being invalid if you use a theme from the Yaru package.
Tweak: Flathub screenshots now better match stock Adwaita, with tweaks to the border radii, window shadows, and titlebar.
ScreenshotConditionalTitlebar now only applies to Linux (Flathub) devices and no longer applies to Windows devices.- Bumped yaru to 10.0.0.
The Inter font has been replaced by InterNotoSansHybrid for much wider language support. You can see more details here: #10.
MaterialApp/CupertinoApp and not ScreenshotApp, you can wrap it with DeviceBox which handles the resizing and media query stuff.Fixed an issue where SelectableText and EditableText widgets would not be found when looking for fonts in the widget tree.
SelectableText and EditableText widgets would not be found when looking for fonts in the widget tree.Improved performance if tester.loadAssets() is called multiple times by caching loaded font assets.
tester.loadAssets() is called multiple times by caching loaded font assets.Replaced Roboto with the more modern Inter as the default fallback font.
fontsToReplaceWithRoboto to fontsToMockkFontsToReplaceWithRoboto to kFontsToMockDeprecated the widgetType parameter of tester.loadAssets(). It is no longer needed or used.
tester.loadAssets().widgetType parameter of tester.loadAssets(). It is no longer needed or used.Migration possibly needed: If some fonts are missing in your goldens after updating, you should pass the names of those fonts to the alsoLoadTheseFont
Migration possibly needed: If some fonts are missing in your goldens after updating, you should pass the names of those fonts to the alsoLoadTheseFonts parameter of tester.loadAssets(). See below for more details.
alsoLoadTheseFonts parameter to tester.loadAssets(), allowing you to specify additional fonts to load beyond those found in the widget tree.
overriddenFonts to fontsToReplaceWithRobotokOverriddenFonts to kFontsToReplaceWithRobotoApple devices now use the official San Francisco Pro fonts to match real devices.
Features
dart run golden_screenshot:download_apple_fonts to download them.ScreenshotApp, Flutter's defaultTargetPlatform is now overridden to match the device's platform.Performance
Nothing published for this version
The ScreenshotConditionalTitlebar widget now hides the minimise/maximize buttons by default on Linux/Flathub screenshots, to comply with Flathub's qua
ScreenshotConditionalTitlebar widget now hides the minimise/maximize buttons by default on Linux/Flathub screenshots, to comply with Flathub's quality guidelines.isMinimizable, isMaximizable, and isClosable parameters to ScreenshotConditionalTitlebar or ScreenshotApp.withConditionalTitlebar.If there's no images to precache, tester.loadAssets() will no longer try to locate a BuildContext, avoiding unnecessary errors.
tester.loadAssets() will no longer try to locate a BuildContext, avoiding unnecessary errors.Migration needed: Remove any calls to tester.useFuzzyComparator(), and make sure you're using testGoldens instead of testWidgets.
Migration needed: Remove any calls to tester.useFuzzyComparator(), and make sure you're using testGoldens instead of testWidgets.
testGoldens now automatically enables the fuzzy comparator and shadow rendering, so you no longer need to call tester.useFuzzyComparator(). It is also no longer called inside tester.expectScreenshot(), so make sure you're using testGoldens to get the benefits.Migration recommended: Replace the deprecated precaching methods with tester.loadAssets().
Migration recommended: Replace the deprecated precaching methods with tester.loadAssets().
tester.loadAssets(), replacing the previous methods for loading images and fonts. This method loads images and fonts at once, simplifying the API.tester.loadFonts(), tester.precacheImagesInWidgetTree(), and tester.precacheTopbarImages(). Use tester.loadAssets() instead.allowedDiffPercent to tester.useFuzzyComparator(). If not provided, it defaults to 0.1 percent.Nothing published for this version
No need to use ScreenshotConditionalTitlebar widget directly anymore. Instead, use the ScreenshotApp.withConditionalTitlebar constructor to do the sam
ScreenshotConditionalTitlebar widget directly anymore. Instead, use the ScreenshotApp.withConditionalTitlebar constructor to do the same thing with less code.ScreenshotFrame, you must now provide the topBar and bottomBar parameters in the constructor (they no longer default to null).Polished the README a little and added example screenshots to it.
ScreenshotFrame() constructor for easier subclassing.Nothing published for this version
The flathub device was previously a combination of Flathub (Linux) and Play Store (Android) requirements. It has now been split into two separate devi
The flathub device was previously a combination of Flathub (Linux) and Play Store (Android) requirements. It has now been split into two separate devices:
flathub device:
metadata/en-US/images/flathubScreenshots/.ScreenshotConditionalTitlebar (see below) for a more native look.androidTablet device:
metadata/en-US/images/tenInchScreenshots/.androidPhone device:
android from before.dart fix tool.Added the ScreenshotConditionalTitlebar widget, which adds a Yaru (Ubuntu) themed titlebar to Linux screenshots.
<br/>(As of v7.1.0, prefer using ScreenshotApp.withConditionalTitlebar instead of using this widget directly.)
Migration needed: Update your goldens by running flutter test --update-goldens.
Migration needed: Update your goldens by running flutter test --update-goldens.
Fixed iOS fonts not being overridden in tester.loadFonts.
tester.loadFonts.kOverriddenFonts for the full list.Migration needed: Delete the metadata/en-US/images/*Screenshots folders and rerun flutter test --update-goldens.
Migration needed: Delete the metadata/en-US/images/*Screenshots folders and rerun flutter test --update-goldens.
olderIphone and olderIpad, so in GoldenScreenshotDevices:
olderIphone and olderIpad have been removed.newerIphone and newerIphone have been renamed to iphone and ipad.GoldenSmallDevices instead of GoldenScreenshotDevices. It's the same but with a lower resolution, resulting in faster tests.Nothing published for this version
You can now run dart fix --apply to automatically rename ScreenshotApp.child to ScreenshotApp.home.
dart fix --apply to automatically rename ScreenshotApp.child to ScreenshotApp.home.FEAT: ScreenshotApp now takes any parameter that MaterialApp takes.
ScreenshotApp now takes any parameter that MaterialApp takes.ScreenshotApp now takes a home parameter instead of a child parameter. This is to be consistent with MaterialApp.ScreenshotApp now extends MaterialApp so if you were using find.bySubtype<MaterialApp>() before, you should now use find.byType(MaterialApp).Removed dependency on the deprecated golden_toolkit package
await tester.loadFonts(overriddenFonts: ['MYFONT', ...kOverriddenFonts]);golden_toolkit packageGolden screenshots now support all standard font weights, instead of just normal and bold (see #8).
You can now use testGoldens(...) instead of testWidgets(...) to automatically enable shadows, instead of manually setting and unsetting debugDisableSh
testGoldens(...) instead of testWidgets(...) to automatically enable shadows, instead of manually setting and unsetting debugDisableShadows.Fixed a compilation error when running flutter test --platform chrome on Flutter 3.29
flutter test --platform chrome on Flutter 3.29Updated the Android topbar to Android 15
Removed the camera cutout from the iphone top bar
Fixed the color of the new top bars not being set
iOS top bar sizes now match exactly with the real devices.
Frame colors are now guessed based on the current theme's surface color. This will hopefully be more reliable than the previous SystemChrome based imp
SystemChrome based implementation.Added ScreenshotFrameColors.dark and ScreenshotFrameColors.light named constants for convenience.
ScreenshotFrameColors.dark and ScreenshotFrameColors.light named constants for convenience.The top and bottom bar colors are now decided by Flutter. In most cases, this is sufficient, but you can still override the foreground brightness with
ScreenshotFrameColors object to ScreenshotApp.Added localization arguments to ScreenshotApp, thanks to @albemala
ScreenshotApp, thanks to @albemalatester.useScreenshotComparator to tester.useFuzzyComparatorFixed regression from 2.2.1 where the wrong comparator would be used on io (non-web).
Fixed compilation issues with flutter test --platform chrome. However, image/font precaching and fuzzy comparison aren't implemented (yet).
flutter test --platform chrome. However, image/font precaching and fuzzy comparison aren't implemented (yet).You can now use tester.useScreenshotComparator (Update: renamed to tester.useFuzzyComparator) without having to use tester.expectScreenshot.
tester.useScreenshotComparator (Update: renamed to tester.useFuzzyComparator) without having to use tester.expectScreenshot.widgetType option in precacheImagesInWidgetTree to allow use without ScreenshotApp.Screenshots now include dialogs with the default finder
Fixed an infinite recursion error in device.matchesGoldenFile
device.matchesGoldenFileAdded the ability to use your own set of devices by creating an enum that stores ScreenshotDevice objects. See the README for more.
ScreenshotDevice objects. See the README for more.ScreenshotDevice.screenshotsFolder. See the README for more.tester.expectScreenshot.# OLD
for (final device in ScreenshotDevice.values) {
testWidgets('for ${device.name}', (tester) async {
# NEW
for (final goldenDevice in GoldenScreenshotDevices.values) {
testWidgets('for ${goldenDevice.name}', (tester) async {
final device = goldenDevice.device;
# OLD
await tester.expectScreenshot(matchesGoldenFile(
'${device.goldenFolder}$goldenFileName.png',
));
# NEW
await tester.expectScreenshot(device, goldenFileName);
Made the Linux screenshots 16:9 so they can also be used for the Play Store.
Nothing published for this version
Nothing published for this version
Added a fuzzy comparator to allow for 0.1% difference between a widget's expected and actual image. You should replace the usual expectLater with test
expectLater with tester.expectScreenshot(matchesGoldenFile(...)) to use this feature.You can now run tester.precacheImagesInWidgetTree() to precache all images currently in the widget tree, instead of having to manually specify each im
tester.precacheImagesInWidgetTree() to precache all images currently in the widget tree, instead of having to manually specify each image with tester.precacheImages([...])Fixed apps that use MediaQuery.size not receiving the simulated screen size
MediaQuery.size not receiving the simulated screen sizeAdded documentation comments to most of the code
- Initial release
Your coding agent can read these notes before it upgrades. Set up the MCP server →