I was trying to implement infinite scrolling with this package but since the PagedMasonryGridView is inside ListView its throws 'Vertical viewport was given unbounded height.' error even though i set shrinkWrap property on the PagedMasonryGridView to true. whats the solution for this?
body: ListView( children: [ Center( child: Column( children: [ Stack( alignment: const Alignment(0, 1.25), children: [ Container( width: Get.width, height: Get.height * 0.35, padding: const EdgeInsets.symmetric(horizontal: 16), decoration: BoxDecoration( color: context.theme.colorScheme.primary, borderRadius: const BorderRadius.only( topLeft: Radius.circular(8), topRight: Radius.circular(8), ), ), child: Center( child: Text.rich( TextSpan( text: "discover".tr, style: Get.textTheme.headlineLarge!.copyWith( color: Colors.white, fontWeight: FontWeight.w900, ), children: [ TextSpan( text: "localBusiness".tr +"!", style: Get.textTheme.headlineLarge!.copyWith( color: Colors.white, ), ), ], ), ), ), ), const Positioned( child: HomePageSearchPlaceHolder(), ), ], ), SizedBox(height: Get.height * 0.06), const Divider(thickness: .1), SizedBox(height: Get.height * 0.02), Obx(() { if (controller.isCategoryLoading.isTrue) { return CategoryShimmerGrid(); } else if (controller.categories.value.isEmpty && homeWrapperController.index.value == 0) { return RNotFound(label: "No Category Found!"); } else if (controller.categories.value.isNotEmpty) return CategoryItemsGrid(); return SizedBox(); }), SizedBox(height: Get.height * 0.02), const Divider(thickness: .1), SizedBox(height: Get.height * 0.02), ], ), ), PagedMasonryGridView.count( crossAxisSpacing: 8, mainAxisSpacing: 8, shrinkWrap: true, physics: BouncingScrollPhysics(), pagingController: controller.pagingController, builderDelegate: PagedChildBuilderDelegate<BusinessModel>( newPageProgressIndicatorBuilder: (_) => RLoading(), firstPageProgressIndicatorBuilder: (_) => RLoading(), animateTransitions: true, itemBuilder: (context, business, index) { return RBusinessContainer(business: business); }, ), crossAxisCount: 2, ), ], ),
as you can see here the PagedMsontryGrid's shrinkWrap is set to true but the error still persists. it works fine with MasonryGridView.builder.