storybook_flutter 0.3.0 copy "storybook_flutter: ^0.3.0" to clipboard
storybook_flutter: ^0.3.0 copied to clipboard

outdated

A storybook for Flutter widgets. Live preview of isolated widgets for faster development and showcase.

Pub Version

storybook_flutter #

A cross-platform storybook for showcasing widgets. It should work in all platforms supported by Flutter.

Getting Started #

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) =>
      Storybook(
        children: [
          Story(
            name: 'Flat button',
            padding: EdgeInsets.all(5), // optional padding customization
            background: Colors.red, // optional background color customization
            builder: (_, k) =>
                MaterialButton(
                  onPressed: k.boolean(label: 'Enabled', initial: true) ? () {} : null,
                  child: Text(k.text(label: 'Text', initial: 'Flat button')),
                ),
          ),
          Story(
            name: 'Raised button',
            builder: (_, k) =>
                RaisedButton(
                  onPressed: k.boolean(label: 'Enabled', initial: true) ? () {} : null,
                  color: k.options(
                    label: 'Color',
                    initial: Colors.deepOrange,
                    options: const [
                      Option('Red', Colors.deepOrange),
                      Option('Green', Colors.teal),
                    ],
                  ),
                  textColor: Colors.white,
                  child: Text(k.text(label: 'Text', initial: 'Raised button')),
                ),
          ),
          Story.simple(
            name: 'Input field',
            child: const TextField(
              decoration: InputDecoration(
                border: OutlineInputBorder(),
                labelText: 'Input field',
              ),
            ),
          ),
        ],
      );
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

289
likes
0
pub points
95%
popularity

Publisher

verified publisherookamikb.dev

A storybook for Flutter widgets. Live preview of isolated widgets for faster development and showcase.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

collection, flutter, provider, recase

More

Packages that depend on storybook_flutter