forked from eatvio/eatvio_app
fixed pagination
This commit is contained in:
8
lib/core/utils/pagination_utils.dart
Normal file
8
lib/core/utils/pagination_utils.dart
Normal file
@@ -0,0 +1,8 @@
|
||||
import 'package:eatvio_app/core/const.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void loadNewContent(ScrollNotification notification, Future<void> Function() load) {
|
||||
if (notification.metrics.pixels >= notification.metrics.maxScrollExtent - thresholdForPagination && !notification.metrics.outOfRange) {
|
||||
load();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user