GoldenToolkitConfiguration constructor

GoldenToolkitConfiguration({
  1. SkipGoldenAssertion skipGoldenAssertion = _doNotSkip,
  2. FileNameFactory fileNameFactory = defaultFileNameFactory,
  3. DeviceFileNameFactory deviceFileNameFactory = defaultDeviceFileNameFactory,
  4. PrimeAssets primeAssets = defaultPrimeAssets,
  5. List<Device> defaultDevices = const [Device.phone, Device.tabletLandscape],
  6. bool enableRealShadows = false,
  7. 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);