theList method

Widget theList(
  1. BuildContext context,
  2. dynamic values
)

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 FollowRequestListItem(
              app: widget.app,
              value: value,
//            app: accessState.app,
              onDismissed: (direction) {
                BlocProvider.of<FollowRequestListBloc>(context)
                    .add(DeleteFollowRequestList(value: value));
                ScaffoldMessenger.of(context).showSnackBar(DeleteSnackBar(
                  message: "FollowRequest $value.documentID",
                  onUndo: () =>
                      BlocProvider.of<FollowRequestListBloc>(context)
                          .add(AddFollowRequestList(value: value)),
                ));
              },
              onTap: () async {},
            );
          }));
}