widgetbook 3.0.0-rc.1 copy "widgetbook: ^3.0.0-rc.1" to clipboard
widgetbook: ^3.0.0-rc.1 copied to clipboard

A flutter storybook that helps professionals and teams to catalogue their widgets.

example/main.dart

import 'package:flutter/material.dart';
import 'package:widgetbook/widgetbook.dart';

void main() {
  runApp(const HotreloadWidgetbook());
}

class HotreloadWidgetbook extends StatelessWidget {
  const HotreloadWidgetbook({super.key});

  @override
  Widget build(BuildContext context) {
    return Widgetbook.material(
      addons: [],
      directories: [
        WidgetbookCategory(
          name: 'widgets',
          children: [
            WidgetbookComponent(
              name: 'Button',
              useCases: [
                WidgetbookUseCase(
                  name: 'elevated',
                  builder: (context) => ElevatedButton(
                    onPressed: () {},
                    child: Text(
                      context.knobs
                          .number(
                            label: 'hello',
                          )
                          .toString(),
                    ),
                  ),
                ),
              ],
            ),
          ],
        )
      ],
    );
  }
}
474
likes
0
pub points
97%
popularity

Publisher

verified publisherwidgetbook.io

A flutter storybook that helps professionals and teams to catalogue their widgets.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

collection, device_frame, flutter, meta, nested, widgetbook_core

More

Packages that depend on widgetbook