getIt static method

Widget getIt(
  1. BuildContext context,
  2. AppModel app,
  3. PageModel pageModel,
  4. bool create,
  5. double widgetWidth,
)

Implementation

static Widget getIt(
  BuildContext context,
  AppModel app,
  PageModel pageModel,
  bool create,
  double widgetWidth,
) {
  var accessBloc = BlocProvider.of<AccessBloc>(context);
  return BlocProvider<PageCreateBloc>(
    create: (context) => PageCreateBloc(
      app,
      accessBloc,
    )..add(PageCreateEventValidateEvent(pageModel)),
    child: PageCreateWidget._(
      app: app,
      create: create,
      widgetWidth: widgetWidth,
    ),
  );
}