storyboard 0.0.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 38

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.

[0.0.1] - TODO: Add release date.

  • Initial release.

Use this package as a library

1. Depend on it

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


dependencies:
  storyboard: ^0.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter 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.4 Apr 3, 2019 Go to the documentation of storyboard 0.0.4 Download storyboard 0.0.4 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
Popularity:
Describes how popular the package is relative to other packages. [more]
61
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
35
Overall:
Weighted score of the above. [more]
38
Learn more about scoring.

We analyzed this package on May 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.0
  • pana: 0.12.15
  • Flutter: 1.5.8

Platforms

Detected platforms:

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running flutter packages pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.3.0-dev.0.1.flutter-1f1592edce.
 
 Because storyboard depends on recase ^1.0.0+1 which requires SDK version >=1.20.0 <2.0.0, version solving failed.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

Package is getting outdated. (-14.79 points)

The package was last published 59 weeks ago.

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/README.md.

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.28.0 <3.0.0