forked from eatvio/eatvio_app
fixed pagination
This commit is contained in:
@@ -7,7 +7,6 @@ import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/prof
|
||||
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.dart';
|
||||
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/widgets/bottom_navigation_bar_widget.dart';
|
||||
import 'package:eatvio_app/features/calendar/presentation/pages/calendar_screen.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/bloc/chats_cubit/chats_cubit.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/chat_screen.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/chats_screen.dart';
|
||||
import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// String baseUrl = 'https://eatvio.ru';
|
||||
String baseUrl = 'https://dev2.eatvio.com';
|
||||
String baseUrl = 'http://10.55.5.123:8080';
|
||||
|
||||
const List<int> durationValues = [7, 14, 21];
|
||||
|
||||
@@ -8,4 +8,5 @@ const List<String> planTypeValues = ['fit', 'slim', 'wellness', 'behavior'];
|
||||
|
||||
const newMessagesChannelName = 'private-new-chat-messages';
|
||||
const newNotificationsChannelName = 'private-message-events';
|
||||
const directChatChannelName = 'private-direct-chat';
|
||||
const directChatChannelName = 'private-direct-chat';
|
||||
const thresholdForPagination = 150;
|
||||
|
||||
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