storyboard 0.0.2 copy "storyboard: ^0.0.2" to clipboard
storyboard: ^0.0.2 copied to clipboard

outdated

Faster iterative development of Flutter user interfaces by isolating widgets from your app.

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 {

  @override
  List<Widget> get storyContent {
    return [new 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 Storybook #

A storybook 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() {
  runApp(new MaterialApp(
      home: new Storybook([
        new ContactsListStory(),
        new ContactsCardStory(contact: new Contact("alice")),
        new ContactsCardStory(contact: new Contact("bob")),
        new ContactsCardStory(contact: new Contact("charlie")),
  ])));
}

Or more simply, run the convenience StoryboardApp directly.

void main() {
  runApp(new StoryboardApp([
    new ContactsListStory(),
    new ContactsCardStory(contact: new Contact("alice")),
    new ContactsCardStory(contact: new Contact("bob")),
    new ContactsCardStory(contact: new Contact("charlie")),
  ]));
}

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

27
likes
0
pub points
53%
popularity

Publisher

verified publisherstarheightmedia.com

Faster iterative development of Flutter user interfaces by isolating widgets from your app.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, recase

More

Packages that depend on storyboard