fix home error

This commit is contained in:
efrilm
2025-09-19 13:18:11 +07:00
parent f18a70b312
commit fabb77d2b9
3 changed files with 19 additions and 23 deletions
+3 -10
View File
@@ -202,21 +202,14 @@ class _HomePageState extends State<HomePage> {
return NotificationListener<
ScrollNotification>(
onNotification: (notification) {
return state.maybeWhen(
orElse: () => false,
loaded: (products,
hasReachedMax,
currentPage,
isLoadingMore) {
return _handleScrollNotification(
notification, categoryId);
},
);
return _handleScrollNotification(
notification, categoryId);
},
child: GridView.builder(
itemCount: products.length,
controller: scrollController,
padding: const EdgeInsets.all(16),
cacheExtent: 80.0,
gridDelegate:
SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: 180,
@@ -60,6 +60,8 @@ class ProductCard extends StatelessWidget {
fit: BoxFit.cover,
width: double.infinity,
height: 120,
memCacheHeight: 120,
memCacheWidth: 120,
errorWidget: (context, url, error) => Container(
width: double.infinity,
height: 120,