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 AssignmentListItem(
app: widget.app,
value: value,
// app: accessState.app,
onDismissed: (direction) {
BlocProvider.of<AssignmentListBloc>(context)
.add(DeleteAssignmentList(value: value));
ScaffoldMessenger.of(context).showSnackBar(DeleteSnackBar(
message: "Assignment $value.documentID",
onUndo: () => BlocProvider.of<AssignmentListBloc>(context)
.add(AddAssignmentList(value: value)),
));
},
onTap: () async {},
);
}));
}