Created
February 3, 2022 07:33
-
-
Save ymkp/2f49ae882dc52c24c33be61103ce4b45 to your computer and use it in GitHub Desktop.
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 characters
| 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, | |
| ) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment