yourWidget method

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

Implementation

@override
Widget yourWidget(BuildContext context, NotificationDashboardModel? value) {
  return BlocBuilder<AccessBloc, AccessState>(
      builder: (context, accessState) {
    if (accessState is AccessDetermined) {
      return BlocProvider<NotificationListBloc>(
        create: (context) => NotificationListBloc(
          eliudQuery: NotificationsPackage.getOpenNotificationsQuery(
              app.documentID, accessState.getMember()!.documentID),
          notificationRepository:
              notificationRepository(appId: app.documentID)!,
        )..add(LoadNotificationList()),
        child: NotificationListWidget(
            app: app,
            readOnly: true,
            widgetProvider: widgetProvider,
            listBackground: BackgroundModel()),
      );
    } else {
      return progressIndicator(app, context);
    }
  });
}