GoldenBuilder.grid constructor

GoldenBuilder.grid({
  1. required int columns,
  2. required double widthToHeightRatio,
  3. WidgetWrapper? wrap,
  4. Color? bgColor,
})

Will output a *.png file with a grid layout in 'tests/goldens' folder.

You need to specify how many columns columns and widthToHeight ratio widthToHeightRatio

widthToHeightRatio can range from 0.0 to 1.0

wrap (optional) will wrap the scenario's widget in the tree.

bgColor will change the background color of output .png file

Implementation

factory GoldenBuilder.grid({
  required int columns,
  required double widthToHeightRatio,
  WidgetWrapper? wrap,
  Color? bgColor,
}) {
  return GoldenBuilder._(
    columns: columns,
    widthToHeightRatio: widthToHeightRatio,
    wrap: wrap,
    bgColor: bgColor,
  );
}