Created
February 3, 2022 07:33
-
-
Save ymkp/2f49ae882dc52c24c33be61103ce4b45 to your computer and use it in GitHub Desktop.
Revisions
-
ymkp created this gist
Feb 3, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ NotificationListener<ScrollNotification>( onNotification: (ScrollNotification scrollInfo) { if (scrollInfo is ScrollEndNotification && // ? <-- dia dah di paling bawah, padding child juga dihitung scrollInfo.metrics.extentAfter == 0 && // ? <-- bener2 mentok sampai ada splash-nya _shopController.productState == ProductState.ok && //? <-- kondisi tambahan, cuma reload kalau lagi tidak loading _shopController.pageQ != -1) { //? <-- kondisi tambahan, cuma reload kalau bukan halaman/paginasi terakhir _shopController.getAllProductsNextPage(); //? <-- yang dilakukan untuk get next items return true; } return false; }, child: ListView.builder( shrinkWrap: true, ) )