LogoWidgetbook

FAQ

Here is a list of questions that have been previously posed by various members. Please review them carefully as they might address some of the concerns or inquiries you might have.

How to configure the widgetbook builder in build.yaml

You can customize the builder as follows and you can find more configuration in the build_config package.

targets:
  $default:
    builders:
      widgetbook_generator:use_case_builder:
        generate_for:
          - lib/widgets/**
How to access the custom theme?

For more detailed information, visit the Custom Theme in Widgetbook.

How would I inject a SafeArea or other widgets into the Device Frame for all use cases?

All devices have a SafeArea by default. Please submit a GitHub issue with the bottom sheet issue (including a reproduction code) to be able to track it better there.

How do we create a Widgetbook account since the 'Get Access' button redirects to Discord without a signup option?

Widgetbook Cloud is in Early Access. If you've submitted the Typeform on our website, you're on the waiting list. For specific details regarding your submission, please DM the email address you used for the Typeform.

I'm facing a Socket issue with NetworkImage and Image.network() in Widgetbook, though it works fine in emulators/simulators. Did I miss a specific configuration?

It sounds like you're running Widgetbook locally on MacOS. On MacOS, you need to grant network access in the XCode project settings. Refer to this link for more details.

How can I align the `scaffoldBackgroundColor` with my custom dark and light themes in Widgetbook?

When referencing the scaffold's background, it's typically about the background of the preview screen/app, which Widgetbook renders using a Material Scaffold defined by the ScaffoldBuildFunction. For custom themes, the default Material Scaffold might not be suitable. To rectify this, you should integrate the custom theme with the scaffold. Check out Custom Theme in Widgetbook. Using the provided context, you can access the prevailing Brightness and/or Theme. It's worth noting that current documentation might be limited regarding custom theming, but improvements are underway.