Introduction

Guides

Snapshots

Snapshots is the billing unit of the builds in Widgetbook Cloud. A snapshot is a screenshot of a Scenario for a story inside a build. For example a button story can have multiple scenarios based on the modes and args defined for it:

final $Button = _Story(
  scenarios: [
    _Scenario(
      name: 'Dark x Short Text',
      modes: [
        MaterialThemeMode('Dark', ThemeData.dark()),
      ],
      args: _Args.fixed(
        text: 'Click Me',
      ),
    ),
    _Scenario(
      name: 'Light x Short Text',
      modes: [
        MaterialThemeMode('Light', ThemeData.light()),
      ],
      args: _Args.fixed(
        text: 'Click Me',
      ),
    ),
    _Scenario(
      name: 'Dark x Long Text',
      modes: [
        MaterialThemeMode('Dark', ThemeData.dark()),
      ],
      args: _Args.fixed(
        text: 'Click Me',
      ),
    ),
    _Scenario(
      name: 'Light x Long Text',
      modes: [
        MaterialThemeMode('Light', ThemeData.light()),
      ],
      args: _Args.fixed(
        text: 'Click Me, I am a button with a very long text',
      ),
    ),
  ],
);
Dark x Short Text
Light x Short Text
Dark x Long Text
Light x Long Text