yourWidget method

  1. @override
Widget yourWidget(
  1. BuildContext context,
  2. BlockingDashboardModel value
)
override

Implementation

@override
Widget yourWidget(BuildContext context, BlockingDashboardModel value) {
  return BlocBuilder<AccessBloc, AccessState>(
      builder: (context, accessState) {
    if (accessState is AccessDetermined) {
      var memberId = accessState.getMember()!.documentID;
      return BlocProvider<MaintainBlockingListBloc>(
          create: (context) => MaintainBlockingListBloc(
                memberId: memberId,
                loggedIn: accessState is LoggedIn ? accessState : null,
                detailed: true,
                appId: app.documentID,
              )..add(LoadMaintainBlockingList()),
          child: MaintainBlockingListWidget(
            app: app,
          ));
    } else {
      return StyleRegistry.registry()
          .styleWithApp(app)
          .adminListStyle()
          .progressIndicator(app, context);
    }
  });
}