theList method
Implementation
Widget theList(
BuildContext context,
values,
) {
var member = Apis.apis().getCoreApi().getMember(context);
return Container(
decoration: widget.listBackground == null
? StyleRegistry.registry()
.styleWithApp(widget.app)
.adminListStyle()
.boxDecorator(widget.app, context, member)
: BoxDecorationHelper.boxDecoration(
widget.app, member, widget.listBackground),
child: ListView.separated(
separatorBuilder: (context, index) => StyleRegistry.registry()
.styleWithApp(widget.app)
.adminListStyle()
.divider(widget.app, context),
shrinkWrap: true,
physics: ScrollPhysics(),
itemCount: values.length,
itemBuilder: (context, index) {
final value = values[index];
if (widget.widgetProvider != null) {
return widget.widgetProvider!(value);
}
return FollowingListItem(
app: widget.app,
value: value,
// app: accessState.app,
onDismissed: (direction) {
BlocProvider.of<FollowingListBloc>(context)
.add(DeleteFollowingList(value: value));
ScaffoldMessenger.of(context).showSnackBar(DeleteSnackBar(
message: "Following $value.documentID",
onUndo: () => BlocProvider.of<FollowingListBloc>(context)
.add(AddFollowingList(value: value)),
));
},
onTap: () async {},
);
}));
}