GoldenToolkitConfiguration constructor
GoldenToolkitConfiguration({
- SkipGoldenAssertion skipGoldenAssertion = _doNotSkip,
- FileNameFactory fileNameFactory = defaultFileNameFactory,
- DeviceFileNameFactory deviceFileNameFactory = defaultDeviceFileNameFactory,
- PrimeAssets primeAssets = defaultPrimeAssets,
- List<
Device> defaultDevices = const [Device.phone, Device.tabletLandscape], - bool enableRealShadows = false,
- Object? tags = const ['golden'],
GoldenToolkitConfiguration constructor
skipGoldenAssertion a func that returns a bool as to whether the golden assertion should be skipped. A typical example may be to skip when the assertion is invoked on certain platforms. For example: () => !Platform.isMacOS
fileNameFactory a func used to decide the final filename for screenMatchesGolden() invocations
deviceFileNameFactory a func used to decide the final filename for multiScreenGolden() invocations
primeAssets a func that is used to ensure that all images have been decoded before trying to render
enableRealShadows a flag indicating that we want the goldens to have real shadows (instead of opaque shadows)
tags a string or iterable of strings used to tag golden tests with
Implementation
GoldenToolkitConfiguration({
this.skipGoldenAssertion = _doNotSkip,
this.fileNameFactory = defaultFileNameFactory,
this.deviceFileNameFactory = defaultDeviceFileNameFactory,
this.primeAssets = defaultPrimeAssets,
this.defaultDevices = const [Device.phone, Device.tabletLandscape],
this.enableRealShadows = false,
this.tags = const ['golden'],
}) : assert(defaultDevices.isNotEmpty);