storyboard 0.0.3

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 74

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 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() {
  runApp(new MaterialApp(
      home: new Storyboard([
        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")),
  ]));
}

Further reading

See the article Storyboarding Widgets in Flutter.

[0.0.2] - 15 Mar 2018

  • Initial release.

[0.0.3] - 22 Mar 2018

  • Readme updates

1. Depend on it

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


dependencies:
  storyboard: "^0.0.3"

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support packages 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';
        
Version Uploaded Documentation Archive
0.0.3 Mar 22, 2018 Go to the documentation of storyboard 0.0.3 Download storyboard 0.0.3 archive
0.0.2 Mar 15, 2018 Go to the documentation of storyboard 0.0.2 Download storyboard 0.0.2 archive
0.0.1 Mar 15, 2018 Go to the documentation of storyboard 0.0.1 Download storyboard 0.0.1 archive

Analysis

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

  • Dart: 2.0.0-dev.49.0
  • pana: 0.10.6
  • Flutter: 0.3.2

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
48 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
74
Learn more about scoring.

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Suggestions

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use storyboard.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0
flutter 0.0.0
recase ^1.0.0+1 1.0.0+1
Transitive dependencies
collection 1.14.6 1.14.9
meta 1.1.2
sky_engine 0.0.99
typed_data 1.1.5
vector_math 2.0.6
Dev dependencies
flutter_test