getView method
Implementation
Widget getView() {
return NotificationListener(
child: GridView.builder(
itemCount: itemsTile.length,
padding: EdgeInsets.all(3),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisSpacing: 3,
mainAxisSpacing: 3,
crossAxisCount: 2
),
itemBuilder: (BuildContext context, int index) {
return itemsTile[index];
},
),
onNotification: (dynamic scrollState) {
if (scrollState is ScrollEndNotification && scrollState.metrics.pixels == scrollState.metrics.extentBefore) {
if(onLoadMore != null) onLoadMore!(this.items!.length);
}
return false;
},
);
}