storybook_flutter icon indicating copy to clipboard operation
storybook_flutter copied to clipboard

How to set default device frame

Open ozkayas opened this issue 1 year ago • 1 comments

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

ozkayas avatar Oct 24 '23 19:10 ozkayas

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

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

ookami-kb avatar Oct 24 '23 21:10 ookami-kb