ookami-kb / storybook_flutter

A storybook for Flutter widgets.
https://pub.dev/packages/storybook_flutter
MIT License
293 stars 66 forks source link

How to set default device frame #127

Open ozkayas opened 1 year ago

ozkayas commented 1 year ago

I am trying to set a default device frame, however I can not figure out how to get the device property for the plugin.

Storybook(
        plugins: [
          ThemeModePlugin(initialTheme: ThemeMode.light),
          DeviceFramePlugin(initialData: (
            isFrameVisible: true,
            device: ???,
            orientation: Orientation.portrait,
          )),
        ],
        initialStory: calendarStory.name,
        stories: [...getStories()]);

It should be nice to be added to the Read.me also

ookami-kb commented 1 year ago

Hey, you can use Devices class, e.g.: Devices.ios.iPhone13ProMax.

Yes, good point, I will add it to readme.