buildBody method

  1. @override
Widget buildBody(
  1. BuildContext context,
  2. Component component,
  3. Story story
)
override

Implementation

@override
Widget buildBody(BuildContext context, Component component, Story story) {
  return Consumer(
    builder: (context, ref, child) {
      final hasParams = ref
          .watch(paramsProvider(ref.watch(paramsScopeIdProvider)))
          .items
          .isNotEmpty;

      if (hasParams) {
        return ParamsEditor();
      }

      return Center(
        child: MarkdownBody(
          // TODO(@melvspace): 10/16/25 add documentation link about params
          data: """
This story has no params

Learn how to interact with your stories with params
            """,
        ),
      );
    },
  );
}