getIt static method

Widget getIt(
  1. BuildContext context,
  2. int containerPrivilege,
  3. AppModel app,
  4. List<BodyComponentModel> bodyComponents,
  5. double widgetWidth,
)

Implementation

static Widget getIt(
  BuildContext context,
  int containerPrivilege,
  AppModel app,
  List<BodyComponentModel> bodyComponents,
  double widgetWidth,
  /*double widgetHeight
    */
) {
//    if (app == null) throw Exception("No app selected");
  return BlocProvider<BodyComponentsCreateBloc>(
    create: (context) => BodyComponentsCreateBloc(
      app,
      bodyComponents,
    )..add(BodyComponentsCreateInitialiseEvent(bodyComponents)),
    child: BodyComponentsCreateWidget._(
      app: app,
      containerPrivilege: containerPrivilege,
      widgetWidth: widgetWidth,
    ),
  );
}