app_deploy_screenshots library

Classes

AppDeployScreenshots
Store screenshots from widget tests.
Callout
A speech bubble with text and an arrow pointing at target.
Caption
A headline, an optional subheadline and an optional footnote.
CaptionEmphasis
How emphasised caption text (between ** markers) is drawn.
Device
This Device is a configuration for golden test. Can be provided for multiScreenGolden
DeviceBezel
Plain rounded-rectangle device outline. No manufacturer artwork, so there is nothing to license.
DeviceGlow
A soft coloured glow around the device.
DeviceMockup
A captured screen drawn inside a device: the same bezel, cutout, buttons and shadow a MarketingFrame draws, as a widget, so several devices, a before/after pair or a panorama can be laid out with ordinary Flutter in a widget slide.
DeviceOutline
A line around the device.
DeviceShadow
A soft shadow under the device.
DeviceStyle
How the device is drawn in a MarketingFrame: bezel, corners, camera cutout, shadow and any crop of the screen.
FrameBackground
The canvas behind the device.
FrameBleed
A device running off the bottom edge, for 1.x-style frames that set FrameLayout: MarketingFrame(bleed: FrameBleed(angle: -8)). When set, it replaces the frame's layout. Same options as SlideLayout.bleed.
FrameDecoration
Something placed on the frame's canvas: a logo, a rating badge, a sticker, a row of integration icons.
Lift
Lifts target out of the screen: the same pixels, drawn in place a little larger with a drop shadow, so a card or row seems to pop off the device. The most common way top store listings point at a feature.
MagnifierInset
Enlarges target into an inset drawn over the screenshot, e.g. to make one message row legible in a store listing.
MarketingFrame
Store-listing artwork: the screenshot scaled down onto a background, with a caption, rounded corners and an optional bezel, at an exact pixel size.
OutputLayout
Where the store methods write their files.
ScreenCapture
One captured screen: the app as it looked on device, with the status bar and annotations drawn. Put it in a DeviceMockup.
ScreenCaptures
The screens captured by AppDeployScreenshots.captureScreens, one per device and variant. Freed automatically when the test ends.
ScreenCrop
A part of the screenshot left out of the frame.
ScreenCutout
The camera cutout drawn over the top of the screen.
ScreenshotAnnotation
Something drawn over a screenshot, positioned by a Finder so it follows the widget on every device size.
ScreenshotContext
What is being captured. Passed to every builder, so captions, frames and backgrounds can change per device, locale and brightness.
ScreenshotFrame
Chooses the frame for each screenshot, so a frame can vary by device, locale and brightness.
ScreenshotRecord
One written screenshot.
ScreenshotVariant
One rendering of a screen: a brightness, a locale, or both.
SlideLayout
Where the caption and the device sit on the canvas.
Spotlight
Dims everything except target, drawing the eye to it.
StatusBarOverlay
Draws a clean status bar into the top safe-area inset: 9:41, full signal, full Wi-Fi, full battery. That is the look store screenshots use, and a widget test otherwise has no status bar at all.
StoreListing
A whole store listing, slide by slide, with the shared design written once and the order counted for you.
TestAssetBundle
An asset bundle that reads through to rootBundle without CachingAssetBundle's 10 KB string limit.

Enums

CalloutPlacement
Where a Callout bubble sits relative to its target.
DevicePlatform
DeviceType
The kind of device a Device is. Store upload folders that sort screenshots by kind, such as fastlane supply's, use it.
DisplaySize
Represents standard iOS device display sizes
FrameLayout
Where the caption and the device sit on the canvas: the 1.x enum.
MagnifierShape
The shape of a MagnifierInset inset.
ScreenshotSource
What a screenshot's image was made from.

Extensions

TestViewExtensions on TestFlutterView
Convenience extensions for configuring elements of the TestView
WidgetFlutterBindingExtensions on TestWidgetsFlutterBinding
Convenience extensions for more easily configuring WidgetTester for pre-set configurations

Functions

encodeOpaquePng(Image image, {Color background = const ui.Color(0xFFFFFFFF)}) → Future<Uint8List>
Encodes image as a 24-bit RGB PNG with no alpha channel, compositing translucent pixels over background. See PngEncoder.encode.

Typedefs

CustomPump = Future<void> Function(WidgetTester tester)
Pumps a custom amount before capture, e.g. a fixed duration for screens that never settle.
DeviceSetup = Future<void> Function(Device device, WidgetTester tester)
Runs for each device, under its overrides, before the capture.
FileNameBuilder = String Function(Device device)
Function definition for allowing for custom file name building
LocaleFolder = String? Function(Locale locale, DevicePlatform platform)
Picks the store folder for locale on platform's store, overriding the built-in mapping. Return null to use the built-in one.
WidgetSlideBuilder = Widget Function(BuildContext context, ScreenshotContext shot)
Builds a widget slide. shot says which device, locale and brightness it is for.