Refactor tenders pagination and enhance API integration
- Updated TendersRepository and TendersService to support cursor-based pagination. - Modified TendersViewModel to manage pagination state and handle API responses more effectively. - Replaced existing pagination UI components with a new WindowedPagination widget across desktop, mobile, and tablet views. - Improved notification handling in the UI to reflect the presence of notifications dynamically. - Adjusted main tenders slider to ensure proper rendering based on the current page index.
This commit is contained in:
+5
-4
@@ -2,6 +2,7 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@@ -130,6 +131,9 @@ class _MyAppState extends State<MyApp> {
|
||||
Widget build(BuildContext context) {
|
||||
// Listen to theme changes
|
||||
final themeProvider = context.watch<ThemeProvider>();
|
||||
final pageTransition = kIsWeb
|
||||
? const FadeUpwardsPageTransitionsBuilder()
|
||||
: const CupertinoPageTransitionsBuilder();
|
||||
|
||||
return ToastificationWrapper(
|
||||
child: MaterialApp.router(
|
||||
@@ -147,10 +151,7 @@ class _MyAppState extends State<MyApp> {
|
||||
pageTransitionsTheme: PageTransitionsTheme(
|
||||
builders: {
|
||||
for (final platform in TargetPlatform.values)
|
||||
platform:
|
||||
kIsWeb
|
||||
? const FadeUpwardsPageTransitionsBuilder()
|
||||
: const CupertinoPageTransitionsBuilder(),
|
||||
platform: pageTransition,
|
||||
},
|
||||
),
|
||||
brightness:
|
||||
|
||||
Reference in New Issue
Block a user