fix home error
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user