getIt static method

Widget getIt(
  1. BuildContext context,
  2. AppModel app,
  3. bool withHeader,
  4. bool collapsed,
  5. bool partOfCreationOfApp, {
  6. FeedbackSelection? feedbackSelection,
})

Implementation

static Widget getIt(BuildContext context, AppModel app, bool withHeader,
    bool collapsed, bool partOfCreationOfApp,
    {FeedbackSelection? feedbackSelection}) {
  return BlocProvider<StyleSelectionBloc>(
    create: (context) => StyleSelectionBloc(app, feedbackSelection)
      ..add(InitialiseStyleSelectionEvent(
          family: app.styleFamily, styleName: app.styleName)),
    child: StyleSelectionWidget._(
        app, withHeader, collapsed, partOfCreationOfApp),
  );
}