pumpWidgetAndMatchWithGesture method

Future<void> pumpWidgetAndMatchWithGesture({
  1. required String groupTitle,
  2. required GoldenBuilder builder,
  3. Future gestureBuilder()?,
  4. bool? autoHeight = true,
  5. Size? surfaceSize,
  6. double? textScaleSize,
  7. Iterable<LocalizationsDelegate>? localizationsDelegates,
  8. Iterable<Locale>? supportedLocales,
  9. WildnessProperties? config,
  10. TextStyle? defaultTextStyle,
  11. Color? primaryColor,
})

Implementation

Future<void> pumpWidgetAndMatchWithGesture({
  required String groupTitle,
  required GoldenBuilder builder,
  Future Function()? gestureBuilder,
  bool? autoHeight = true,
  Size? surfaceSize,
  double? textScaleSize,
  Iterable<LocalizationsDelegate<dynamic>>? localizationsDelegates,
  Iterable<Locale>? supportedLocales,
  WildnessProperties? config,
  TextStyle? defaultTextStyle,
  Color? primaryColor,
}) async {
  await pumpWidgetBuilder(
    builder.build(),
    wrapper: wildnessWidgetWrapper(
      config: config,
      defaultTextStyle: defaultTextStyle,
      localizationsDelegates: localizationsDelegates,
      supportedLocales: supportedLocales,
      primaryColor: primaryColor,
    ),
    surfaceSize: surfaceSize ?? const Size(800, 600),
    textScaleSize: textScaleSize ?? 1.0,
  );

  await pumpAndSettle();

  await gestureBuilder?.call();

  await screenMatchesGolden(
    this,
    screenMatchesName(groupTitle),
    autoHeight: autoHeight,
  );
}