41 Widget
build(BuildContext context) {
42 return BlocBuilder<PendingCollectionsBloc, PendingCollectionsState>(
43 buildWhen: (previous, current) => current is PendingCollectionsLoading || current is
PendingCollectionsLoaded || current is PendingCollectionsError,
44 builder: (context, state) {
46 if (state.collections.isEmpty) {
47 return EmptyContent(text:
"common.no_pending_collections".tr());
49 return ListView.builder(
50 physics:
const AlwaysScrollableScrollPhysics(),
51 itemCount: state.collections.length + 1,
52 itemBuilder: (context, index) {
55 padding: EdgeInsets.all(15.sp),
57 title:
"Pending Collections",
58 number: state.collections.length.toString(),
59 subtitle: _getCollectionQuantity(state.collections),
60 gradient: const LinearGradient(
61 begin: Alignment.topLeft,
62 end: Alignment.bottomRight,
63 colors: [ColorPalette.grey, ColorPalette.darkGrey],
68 return CollectionItem(
77 return const Loading();