getWidget static method

Widget getWidget(
  1. AppModel app,
  2. BuildContext context,
  3. HtmlWithPlatformMediumModel model,
  4. EditorFeedback editorFeedback, {
  5. AddMediaHtml? addMediaHtml,
})

Implementation

static Widget getWidget(
  AppModel app,
  BuildContext context,
  HtmlWithPlatformMediumModel model,
  EditorFeedback editorFeedback, {
  AddMediaHtml? addMediaHtml,
}) {
  return PointerInterceptor(
      child: BlocProvider<HtmlPlatformMediumBloc>(
          create: (context) => HtmlPlatformMediumBloc(
                app.documentID,
              )..add(ExtEditorBaseInitialise<HtmlWithPlatformMediumModel>(
                  model,
                  reretrieveModel: false)),
          child: HtmlWithPlatformMediumComponents._(
            app: app,
            addMediaHtml: addMediaHtml,
            editorFeedback: editorFeedback,
          )));
}