addScenario method
Add a golden test scenario
Implementation
void addScenario({
required String name,
required Widget widget,
Screen? screen,
}) {
assert(_deviceSizes.isEmpty != (screen == null));
if (screen != null)
return _scenarios.add(
Scenario(
name: name,
widget: widget,
screen: screen,
wrap: wrapScenario,
),
);
else
_scenarios.addAll(
_deviceSizes.map(
(screen) => Scenario(
name: name,
widget: widget,
screen: screen,
wrap: wrapScenario,
),
),
);
}