added your tenders screen

This commit is contained in:
amirrezaghabeli
2025-08-05 19:18:47 +03:30
parent 9f6c458e15
commit 21d13ac072
24 changed files with 682 additions and 63 deletions
+6
View File
@@ -1,6 +1,9 @@
class AssetsManager {
AssetsManager._();
//bottom navigation
static const homeActive = 'assets/icons/home_active.svg';
// login page
static const logo = 'assets/pngs/logo.png';
static const userIcon = 'assets/svgs/user_icon.svg';
@@ -17,4 +20,7 @@ class AssetsManager {
static const location = 'assets/icons/location.svg';
static const arrowCircleLeft = 'assets/icons/arrow-circle-left.svg';
static const arrowCircleRight = 'assets/icons/arrow-circle-right.svg';
//your tenders page
static const tickCircle = 'assets/icons/tick-circle.svg';
}
+13 -2
View File
@@ -8,8 +8,8 @@ class AppColors {
static const Color accentColor = Color(0xFFE83E8C);
// Backgrounds
static const Color lightBackgroundColor = Color(0xFFF8F9FA);
static const Color darkBackgroundColor = Color(0xFF343A40);
static const Color lightBackgroundColor = Color(0xFFFFFFFF);
static const Color darkBackgroundColor = Color(0xFF222222);
// Text Colors
static const Color primaryTextColor = Color(0xFF212529);
@@ -22,6 +22,8 @@ class AppColors {
static const Color warningColor = Color(0xFFFFC107);
static const Color grey = Color(0xFF555555);
static const Color grey20 = Color(0xFFE4E4E4);
static const Color grey40 = Color(0xFFDADADA);
static const Color grey50 = Color(0xFF9E9E9E);
static const Color grey60 = Color(0xFF777777);
static const Color grey70 = Color(0xFF444444);
@@ -31,4 +33,13 @@ class AppColors {
static const Color backgroundColor = Color(0xFFFFFFFF);
static const Color borderColor = Color(0xFFE1E1E1);
static const Color primary2 = Color(0xFFE5EFFF);
static const Color dividerColor = Color(0xFFE1E1E1);
static const Color gren0 = Color(0xFFF9FCF8);
static const Color green10 = Color(0xFFE0F0DC);
static const Color gren20 = Color(0xFFDAF8D6);
static const Color gren30 = Color(0xFF289744);
static const Color red0 = Color(0xFFF8D6D6);
static const Color red10 = Color(0xFFC02525);
}
+6
View File
@@ -35,4 +35,10 @@ class AppStrings {
//Tenders
static const String tendersTitle = 'Tenders';
//profile
static const String profile = 'Profile';
//your tenders
static const String yourTendersTitle = 'Your tenders';
}
+12 -1
View File
@@ -5,6 +5,7 @@ import '../../views/home/home_screen.dart';
import '../../views/login/login_screen.dart';
import '../../views/profile/profile_screen.dart';
import '../../views/tenders/tenders_screen.dart';
import '../../views/your_tenders/your_tenders_screen.dart';
import 'app_shell_screen.dart';
part 'app_routes.g.dart';
@@ -20,7 +21,7 @@ final GlobalKey<NavigatorState> profileNavigatorKey =
// Main app router
final GoRouter appRouter = GoRouter(
routes: $appRoutes,
initialLocation: '/login',
initialLocation: '/home',
navigatorKey: rootNavigatorKey,
);
@@ -134,3 +135,13 @@ class ProfileRouteData extends GoRouteData with _$ProfileRouteData {
return const ProfileScreen();
}
}
@TypedGoRoute<YourTendersRouteData>(path: '/your-tenders')
class YourTendersRouteData extends GoRouteData with _$YourTendersRouteData {
const YourTendersRouteData();
@override
Widget build(BuildContext context, GoRouterState state) {
return const YourTendersScreen();
}
}
+32 -1
View File
@@ -6,7 +6,11 @@ part of 'app_routes.dart';
// GoRouterGenerator
// **************************************************************************
List<RouteBase> get $appRoutes => [$loginScreenRoute, $appShellRouteData];
List<RouteBase> get $appRoutes => [
$loginScreenRoute,
$appShellRouteData,
$yourTendersRouteData,
];
RouteBase get $loginScreenRoute =>
GoRouteData.$route(path: '/login', factory: _$LoginScreenRoute._fromState);
@@ -134,3 +138,30 @@ mixin _$ProfileRouteData on GoRouteData {
@override
void replace(BuildContext context) => context.replace(location);
}
RouteBase get $yourTendersRouteData => GoRouteData.$route(
path: '/your-tenders',
factory: _$YourTendersRouteData._fromState,
);
mixin _$YourTendersRouteData on GoRouteData {
static YourTendersRouteData _fromState(GoRouterState state) =>
const YourTendersRouteData();
@override
String get location => GoRouteData.$location('/your-tenders');
@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);
}
+4 -1
View File
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:go_router/go_router.dart';
import '../constants/assets.dart';
import '../utils/size_config.dart';
class AppShellScreen extends StatelessWidget {
@@ -19,6 +20,7 @@ class AppShellScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
SizeConfig.init(context);
return Scaffold(
body: navigationShell,
bottomNavigationBar: Container(
@@ -38,7 +40,7 @@ class AppShellScreen extends StatelessWidget {
isActive: navigationShell.currentIndex == 0,
onTap: () => _gotoBranch(0),
iconPath: 'assets/icons/home.svg',
activeIconPath: 'assets/icons/homeActive.svg',
activeIconPath: AssetsManager.homeActive,
),
_bottomNavigationItem(
context: context,
@@ -81,6 +83,7 @@ class AppShellScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SvgPicture.asset(isActive ? activeIconPath : iconPath),
Text(
text,
style: TextStyle(