PackageTrack
Sign in Get early access

golden_screenshot

Utilities to automate screenshot generation using Flutter's golden tests.

12.0.0 18K downloads/mo #2299 most downloaded on pub.dev adil192/golden_screenshot

What this package is like to depend on

Last release 10 days ago

13 Aug 2026

Release timing varies

gaps range from 8 days to 5 months

Most releases are documented

notes for 45 of 51 stable releases

2 versions withdrawn

withdrawn after publishing

2 years old

53 releases · first in 2024

27 releases in the last 12 months

see the full history below

Release timeline

53 releases · Aug 2024 to Aug 2026
2025 2026
Release Pre-release Withdrawn

Releases

latest 53
  1. 12.0.0 13 Aug 2026
    Release notes
    • Migrated to material_ui as the decoupled Material library from Flutter 3.47.0.
    • Bumped the minimum Flutter version to 3.47.0.
    Open source →
  2. 11.0.1 20 Mar 2026
    Release notes
    • Fixed the titlebar's font being invalid if you use a theme from the Yaru package.
    Open source →
  3. 11.0.0 20 Mar 2026
    Release notes
    • Tweak: Flathub screenshots now better match stock Adwaita, with tweaks to the border radii, window shadows, and titlebar.
    • Tweak: ScreenshotConditionalTitlebar now only applies to Linux (Flathub) devices and no longer applies to Windows devices.
    • Chore: Removed the dependency on the Yaru package.
    Open source →
  4. 10.0.1 18 Mar 2026
    Release notes
    • Bumped yaru to 10.0.0.
    Open source →
  5. 10.0.0 31 Jan 2026
    Release notes
    • The Inter font has been replaced by InterNotoSansHybrid for much wider language support. You can see more details here: #10.
      • I'm bumping the package version to 10.0.0 since this may result in some slight font spacing changes.
    • If you need to use MaterialApp/CupertinoApp and not ScreenshotApp, you can wrap it with DeviceBox which handles the resizing and media query stuff.
    Open source →
  6. 9.1.2 09 Dec 2025
    Release notes
    • Fixed an issue where SelectableText and EditableText widgets would not be found when looking for fonts in the widget tree.
    Open source →
  7. 9.1.1 08 Dec 2025
    Release notes
    • Improved performance if tester.loadAssets() is called multiple times by caching loaded font assets.
    Open source →
  8. 9.1.0 08 Dec 2025
    Release notes
    • Replaced Roboto with the more modern Inter as the default fallback font.
    • Renamed some parameters as necessary:
      • fontsToReplaceWithRoboto to fontsToMock
      • kFontsToReplaceWithRoboto to kFontsToMock
    Open source →
  9. 9.0.1 08 Dec 2025
    Release notes
    • Fixed an issue where some icon fonts were not found in tester.loadAssets().
    • Deprecated the widgetType parameter of tester.loadAssets(). It is no longer needed or used.
    Open source →
  10. 9.0.0 07 Dec 2025 withdrawn
    Release notes

    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.

    • Only fonts found in the widget tree will be loaded now.
      • This cut down golden_screenshot's testing time from ~25 seconds to ~15 seconds.
      • The actual speedup may not be as dramatic in your app since it only reduces font loading in goldens (not unit tests or regular widget tests).
      • Tests will also use less RAM now, especially critical for computers or CI systems with low memory.
    • Added the alsoLoadTheseFonts parameter to tester.loadAssets(), allowing you to specify additional fonts to load beyond those found in the widget tree.
      • This is useful if you use fonts in ways that don't show up in the widget tree, e.g. inside a CustomPainter's paint function.
    • Renamed some parameters for clarity:
      • overriddenFonts to fontsToReplaceWithRoboto
      • kOverriddenFonts to kFontsToReplaceWithRoboto
    Open source →
  11. 8.2.0 06 Dec 2025
    Release notes

    Features

    • Apple devices now use the official San Francisco Pro fonts to match real devices.
      • Due to licensing restrictions, these fonts are not bundled with the package.
      • You need to run dart run golden_screenshot:download_apple_fonts to download them.
      • If you haven't done this, Roboto will be used instead (just like before), and your tests will remind you to run the command.
    • When using ScreenshotApp, Flutter's defaultTargetPlatform is now overridden to match the device's platform.

    Performance

    • Only one copy of Roboto is stored in memory now. Previously, each font fallback had its own copy of Roboto which wasted RAM.
    Open source →
  12. 8.1.1 27 Nov 2025

    Nothing published for this version

  13. 8.1.0 11 Nov 2025
    Release notes
    • The ScreenshotConditionalTitlebar widget now hides the minimise/maximize buttons by default on Linux/Flathub screenshots, to comply with Flathub's quality guidelines.
    • You can override this behaviour by passing isMinimizable, isMaximizable, and isClosable parameters to ScreenshotConditionalTitlebar or ScreenshotApp.withConditionalTitlebar.
    Open source →
  14. 8.0.1 05 Nov 2025
    Release notes
    • If there's no images to precache, tester.loadAssets() will no longer try to locate a BuildContext, avoiding unnecessary errors.
    • Simplified the example test code.
    Open source →
  15. 8.0.0 05 Nov 2025
    Release notes

    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.
    Open source →
  16. 7.2.0 05 Nov 2025
    Release notes

    Migration recommended: Replace the deprecated precaching methods with tester.loadAssets().

    • Added tester.loadAssets(), replacing the previous methods for loading images and fonts. This method loads images and fonts at once, simplifying the API.
    • Deprecated tester.loadFonts(), tester.precacheImagesInWidgetTree(), and tester.precacheTopbarImages(). Use tester.loadAssets() instead.
    • It is now optional to pass allowedDiffPercent to tester.useFuzzyComparator(). If not provided, it defaults to 0.1 percent.
    • Added an example to the README of using a custom frame for more than just system UIs.
    Open source →
  17. 7.1.0 02 Nov 2025
    Release notes
    • No need to use ScreenshotConditionalTitlebar widget directly anymore. Instead, use the ScreenshotApp.withConditionalTitlebar constructor to do the same thing with less code.
    • If you're subclassing ScreenshotFrame, you must now provide the topBar and bottomBar parameters in the constructor (they no longer default to null).
    Open source →
  18. 7.1.0+1 04 Nov 2025

    Nothing published for this version

  19. 7.0.1 02 Nov 2025
    Release notes
    • Polished the README a little and added example screenshots to it.
    • Updated the example/demo app to be prettier and have more flexible testing.
    • Added an unnamed ScreenshotFrame() constructor for easier subclassing.
    Open source →
  20. 7.0.1+1 02 Nov 2025

    Nothing published for this version

  21. 7.0.0 01 Nov 2025
    Release notes
    • The flathub device was previously a combination of Flathub (Linux) and Play Store (Android) requirements. It has now been split into two separate devices:

      1. The new flathub device:
        • Has rounded corners and a shadow to match real Gnome screenshots.
        • Screenshots are saved in metadata/en-US/images/flathubScreenshots/.
        • I recommend you use a ScreenshotConditionalTitlebar (see below) for a more native look.
      2. The new androidTablet device:
        • Has a top and bottom bar matching Android 16 QPR1 (Material 3 Expressive) tablets.
        • Screenshots are saved in metadata/en-US/images/tenInchScreenshots/.
      3. The renamed androidPhone device:
        • Exactly the same as android from before.
        • Migration can be done automatically with the 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.)

    Open source →
  22. 6.0.0 23 Oct 2025
    Release notes

    Migration needed: Update your goldens by running flutter test --update-goldens.

    • Updated the top bars to Android 16 QPR1 (Material 3 Expressive) and iOS 26 (Liquid Glass).
    • Switched the android device from the Pixel 6 Pro to the Pixel 9 Pro.
    Open source →
  23. 5.1.0 22 Oct 2025
    Release notes
    • Fixed iOS fonts not being overridden in tester.loadFonts.
    • Overridden a bunch more common system fonts: see kOverriddenFonts for the full list.
    Open source →
  24. 5.0.0 15 Oct 2025
    Release notes

    Migration needed: Delete the metadata/en-US/images/*Screenshots folders and rerun flutter test --update-goldens.

    • Apple no longer requires screenshots from olderIphone and olderIpad, so in GoldenScreenshotDevices:
      • olderIphone and olderIpad have been removed.
      • newerIphone and newerIphone have been renamed to iphone and ipad.
    • For non-user-facing goldens, you can now use GoldenSmallDevices instead of GoldenScreenshotDevices. It's the same but with a lower resolution, resulting in faster tests.
    Open source →
  25. 5.0.0+1 17 Oct 2025

    Nothing published for this version

  26. 4.0.1 01 Oct 2025
    Release notes
    • You can now run dart fix --apply to automatically rename ScreenshotApp.child to ScreenshotApp.home.
    Open source →
  27. 4.0.0 29 Sep 2025
    Release notes
    • FEAT: ScreenshotApp now takes any parameter that MaterialApp takes.
    • BREAKING TWEAK: ScreenshotApp now takes a home parameter instead of a child parameter. This is to be consistent with MaterialApp.
    • BREAKING TWEAK: ScreenshotApp now extends MaterialApp so if you were using find.bySubtype<MaterialApp>() before, you should now use find.byType(MaterialApp).
    Open source →
  28. 3.3.0 31 May 2025
    Release notes
    • If you encounter a font falling back to Ahem, please use await tester.loadFonts(overriddenFonts: ['MYFONT', ...kOverriddenFonts]);
    • Removed dependency on the deprecated golden_toolkit package
    Open source →
  29. 3.2.1 12 May 2025
    Release notes
    • Golden screenshots now support all standard font weights, instead of just normal and bold (see #8).
    Open source →
  30. 3.2.0 20 Feb 2025
    Release notes
    • You can now use testGoldens(...) instead of testWidgets(...) to automatically enable shadows, instead of manually setting and unsetting debugDisableShadows.
    Open source →
  31. 3.1.4 12 Feb 2025
    Release notes
    • Fixed a compilation error when running flutter test --platform chrome on Flutter 3.29
    Open source →
  32. 3.1.3 31 Dec 2024
    Release notes
    • Updated the Android topbar to Android 15
    Open source →
  33. 3.1.2 31 Dec 2024
    Release notes
    • Removed the camera cutout from the iphone top bar
    Open source →
  34. 3.1.1 31 Dec 2024
    Release notes
    • Fixed the color of the new top bars not being set
    Open source →
  35. 3.1.0 31 Dec 2024 withdrawn
    Release notes
    • iOS top bar sizes now match exactly with the real devices.
    • Switched newerIphone to the iPhone 16 Pro Max.
    Open source →
  36. 3.0.2 29 Dec 2024
    Release notes
    • Frame colors are now guessed based on the current theme's surface color. This will hopefully be more reliable than the previous SystemChrome based implementation.
    Open source →
  37. 3.0.1 25 Dec 2024
    Release notes
    • Added ScreenshotFrameColors.dark and ScreenshotFrameColors.light named constants for convenience.
    Open source →
  38. 3.0.0 23 Dec 2024
    Release notes
    • 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 by passing a ScreenshotFrameColors object to ScreenshotApp.
    Open source →
  39. 2.3.0 23 Dec 2024
    Release notes
    • Added localization arguments to ScreenshotApp, thanks to @albemala
    • Renamed tester.useScreenshotComparator to tester.useFuzzyComparator
    Open source →
  40. 2.2.2 05 Dec 2024
    Release notes
    • Fixed regression from 2.2.1 where the wrong comparator would be used on io (non-web).
    Open source →
  41. 2.2.1 17 Nov 2024
    Release notes
    • Fixed compilation issues with flutter test --platform chrome. However, image/font precaching and fuzzy comparison aren't implemented (yet).
    Open source →
  42. 2.2.0 17 Nov 2024
    Release notes
    • You can now use tester.useScreenshotComparator (Update: renamed to tester.useFuzzyComparator) without having to use tester.expectScreenshot.
    • Added a missing widgetType option in precacheImagesInWidgetTree to allow use without ScreenshotApp.
    Open source →
  43. 2.1.0 12 Sep 2024
    Release notes
    • Screenshots now include dialogs with the default finder
    Open source →
  44. 2.0.1 10 Aug 2024
    Release notes
    • Fixed an infinite recursion error in device.matchesGoldenFile
    Open source →
  45. 2.0.0 10 Aug 2024
    Release notes
    • Added the ability to use your own set of devices by creating an enum that stores ScreenshotDevice objects. See the README for more.
    • Added the ability to customize where the goldens are stored by setting ScreenshotDevice.screenshotsFolder. See the README for more.
    • Added the ability to use multiple locales by passing a locale code to tester.expectScreenshot.
    • Because of the above, you'll need to make the following changes (see the example for more):
      # 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);
      
    Open source →
  46. 1.5.0 10 Aug 2024
    Release notes
    • Made the Linux screenshots 16:9 so they can also be used for the Play Store.
    Open source →
  47. 1.4.0 10 Aug 2024

    Nothing published for this version

  48. 1.3.0 10 Aug 2024

    Nothing published for this version

  49. 1.2.0 09 Aug 2024
    Release notes
    • 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 tester.expectScreenshot(matchesGoldenFile(...)) to use this feature.
    Open source →
  50. 1.1.0 09 Aug 2024
    Release notes
    • You can now run tester.precacheImagesInWidgetTree() to precache all images currently in the widget tree, instead of having to manually specify each image with tester.precacheImages([...])
    Open source →
  51. 1.0.2 09 Aug 2024
    Release notes
    • Fixed apps that use MediaQuery.size not receiving the simulated screen size
    Open source →
  52. 1.0.1 09 Aug 2024
    Release notes
    • Added documentation comments to most of the code
    Open source →
  53. 1.0.0 09 Aug 2024
    Release notes
    • Initial release
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive