Add board navigation and assets
- Introduced new board-related assets in AssetsManager. - Updated NetworkManager to increase connection and receive timeouts to 20 seconds. - Added BoardRouteData for navigation to the BoardScreen. - Updated app routes to include the new board route. - Modified DesktopNavigationWidget to include a navigation item for the board. - Added a new string constant for the board label in TendersStrings.
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:tm_app/views/board/board_screen.dart';
|
||||
import 'package:tm_app/views/completion_of_documents/pages/complectopn_of_documents_screen.dart';
|
||||
import 'package:tm_app/views/detail/pages/detail_screen.dart';
|
||||
import 'package:tm_app/views/forget_password_create/pages/forgot_password_create_screen.dart';
|
||||
@@ -265,6 +266,16 @@ class LikedTendersRouteData extends GoRouteData with _$LikedTendersRouteData {
|
||||
}
|
||||
}
|
||||
|
||||
@TypedGoRoute<BoardRouteData>(path: '/board')
|
||||
class BoardRouteData extends GoRouteData with _$BoardRouteData {
|
||||
const BoardRouteData();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return const BoardScreen();
|
||||
}
|
||||
}
|
||||
|
||||
// @TypedGoRoute<CompletionOfDocumentsRouteData>(
|
||||
// path: '/completion-of-documents',
|
||||
// )
|
||||
|
||||
@@ -14,6 +14,7 @@ List<RouteBase> get $appRoutes => [
|
||||
$finalCompletionOfDocumentsRouteData,
|
||||
$completionOfDocumentsRouteData,
|
||||
$likedTendersRouteData,
|
||||
$boardRouteData,
|
||||
$tenderDetailRouteData,
|
||||
$forgotPasswordRouteData,
|
||||
$forgotPasswordOtpRouteData,
|
||||
@@ -353,6 +354,30 @@ mixin _$LikedTendersRouteData on GoRouteData {
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
RouteBase get $boardRouteData =>
|
||||
GoRouteData.$route(path: '/board', factory: _$BoardRouteData._fromState);
|
||||
|
||||
mixin _$BoardRouteData on GoRouteData {
|
||||
static BoardRouteData _fromState(GoRouterState state) =>
|
||||
const BoardRouteData();
|
||||
|
||||
@override
|
||||
String get location => GoRouteData.$location('/board');
|
||||
|
||||
@override
|
||||
void go(BuildContext context) => context.go(location);
|
||||
|
||||
@override
|
||||
Future<T?> push<T>(BuildContext context) => context.push<T>(location);
|
||||
|
||||
@override
|
||||
void pushReplacement(BuildContext context) =>
|
||||
context.pushReplacement(location);
|
||||
|
||||
@override
|
||||
void replace(BuildContext context) => context.replace(location);
|
||||
}
|
||||
|
||||
RouteBase get $tenderDetailRouteData => GoRouteData.$route(
|
||||
path: '/tender-detail',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user