storyboard 0.0.6

  • Readme
  • Changelog
  • Installing
  • 82

Storyboard #

pub package

Faster iterative development of Flutter user interfaces by isolating widgets from your app, inspired by Storybook. Stage a collection of Widgets outside their normal app context. By repeating the same widget in various configurations or states in a single view, the effect of code changes to the Widget can quickly be assessed. This is especially useful for cosmetic changes, but also effective for behavior changes.

Adding Stories #

The first step is to build a few stories, from which your Storyboard will be composed. Building stories is done by providing concrete children of the Story abstract class, e.g.

import 'package:mypackage/contacts.dart';
import 'package:storyboard/storyboard.dart';

class ContactsListStory extends Story {

  List<Widget> get storyContent {
    return [ContactsList()];

At a minimum, the abstract storyContent getter, which provides the widgets to be observed, must be overridden. Overriding the title will alter the heading presented for the story. Overriding isFullScreen (or implementing FullScreenStory) will instruct the Widget to render itself within a new Navigator route without scaffolding.

The build method itself can also be overridden to completely customize the display of the Story.

Building a Storyboard #

A storyboard is little more than a collection of stories.

import 'package:flutter/material.dart';
import 'package:storyboard/storyboard.dart';
import 'stories/contacts_story.dart';

void main() {
      home: Storyboard([
        ContactsCardStory(contact: Contact("alice")),
        ContactsCardStory(contact: Contact("bob")),
        ContactsCardStory(contact: Contact("charlie")),

Or more simply, run the convenience StoryboardApp directly.

void main() {
    ContactsCardStory(contact: Contact("alice")),
    ContactsCardStory(contact: Contact("bob")),
    ContactsCardStory(contact: Contact("charlie")),

Further reading #

See the article Storyboarding Widgets in Flutter.

[0.0.6] - 07 Apr 2020 #

  • Remove unnecessary new - thanks @MisterJimson

[0.0.5] - 27 Jan 2020 #

  • Forward theme to storyboard - thanks @heralight

  • Forward theme to storyboard - thanks @heralight

[0.0.2] - 15 Mar 2018 #

  • Initial release.

[0.0.3] - 22 Mar 2018 #

  • Readme updates

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  storyboard: ^0.0.6

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:storyboard/storyboard.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Apr 7, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (recase).

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and storyboard.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
recase ^2.0.1 2.0.1 3.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies