From 9c6454acfd1cc14fbcab520d7840e94a12ae5ab6 Mon Sep 17 00:00:00 2001 From: Factorino73 Date: Mon, 30 Sep 2024 23:21:42 +0400 Subject: [PATCH] LabWork06 Fix --- lib/view/home_page/home_page.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/view/home_page/home_page.dart b/lib/view/home_page/home_page.dart index 5591831..4fead2a 100644 --- a/lib/view/home_page/home_page.dart +++ b/lib/view/home_page/home_page.dart @@ -160,7 +160,9 @@ class _BodyState extends State<_Body> { } Future _onRefresh() { - context.read().add(HomeLoadDataEvent(search: searchController.text)); + context + .read() + .add(HomeLoadDataEvent(search: searchController.text)); return Future.value(null); } @@ -196,7 +198,7 @@ class _BodyState extends State<_Body> { } void _onNextPageListener() { - if (scrollController.offset > scrollController.position.maxScrollExtent) { + if (scrollController.offset >= scrollController.position.maxScrollExtent) { // preventing multiple pagination request on multiple swipes final bloc = context.read(); if (!bloc.state.isPaginationLoading) {