yourWidget method
Implementation
@override
Widget yourWidget(BuildContext context, FeedMenuModel? value) {
if (value == null) {
return text(app, context, "feedMenuModel is null");
}
if (value.feedFront == null) {
return text(app, context, "feedMenuModel.feedFront is null");
}
if (value.feedFront!.feed == null) {
return text(app, context, "feedMenuModel.feedFront!.feed is null");
}
var modalRoute = ModalRoute.of(context) as ModalRoute;
var feedId = value.feedFront!.feed!.documentID;
return BlocBuilder<AccessBloc, AccessState>(
builder: (context, accessState) {
if (accessState is AccessDetermined) {
return BlocProvider<ProfileBloc>(
create: (context) => ProfileBloc()
..add(
InitialiseProfileEvent(app, feedId, accessState, modalRoute)),
child: FeedMenu(app, value));
} else {
return progressIndicator(app, context);
}
});
}