From 12310625ef48015faf1655adce59e599a9a6530a Mon Sep 17 00:00:00 2001 From: venbaittech Date: Wed, 7 May 2025 11:35:48 +0530 Subject: [PATCH] google fonts --- lib/Screens/allTrips/list_all_plans.dart | 21 +++++++--- lib/Screens/allTrips/travel_agent_list.dart | 20 ++++++--- lib/Screens/approvals/approval_list.dart | 20 ++++++--- lib/Screens/plans/create_plans.dart | 37 ++++++++++++----- lib/Screens/plans/list_plans.dart | 20 ++++++--- lib/routes/custom_appBar.dart | 41 +++++++++++-------- lib/routes/custom_drawer.dart | 20 ++++++--- macos/Flutter/GeneratedPluginRegistrant.swift | 2 + pubspec.lock | 32 +++++++++++++++ pubspec.yaml | 1 + 10 files changed, 158 insertions(+), 56 deletions(-) diff --git a/lib/Screens/allTrips/list_all_plans.dart b/lib/Screens/allTrips/list_all_plans.dart index 11ae9b5..7e7e844 100644 --- a/lib/Screens/allTrips/list_all_plans.dart +++ b/lib/Screens/allTrips/list_all_plans.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'dart:core'; import 'package:frontend/data/models/plan.dart'; import 'package:go_router/go_router.dart'; +import 'package:google_fonts/google_fonts.dart'; import 'package:http/http.dart' as http; import 'package:flutter/material.dart'; import 'package:frontend/config/apiUrl.dart'; @@ -331,12 +332,20 @@ class _ListAllPlansState extends State { children: [ Row( children: [ - Text('All Trips', - style: TextStyle( - fontFamily: "Inter", - fontSize: isDesktop ? 16 : 14, - fontWeight: FontWeight.w600, - color: const Color(0xFF212121))), + Text( + 'All Trips', + style: GoogleFonts.poppins( + fontSize: isDesktop ? 16 : 14, + fontWeight: FontWeight.w600, + color: Colors.black, + ), + + // style: TextStyle( + // fontFamily: "Inter", + // fontSize: isDesktop ? 16 : 14, + // fontWeight: FontWeight.w600, + // color: const Color(0xFF212121) ) + ), ], ), diff --git a/lib/Screens/allTrips/travel_agent_list.dart b/lib/Screens/allTrips/travel_agent_list.dart index eb3e512..4133905 100644 --- a/lib/Screens/allTrips/travel_agent_list.dart +++ b/lib/Screens/allTrips/travel_agent_list.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'dart:core'; import 'package:frontend/data/models/plan.dart'; import 'package:go_router/go_router.dart'; +import 'package:google_fonts/google_fonts.dart'; import 'package:http/http.dart' as http; import 'package:flutter/material.dart'; import 'package:frontend/config/apiUrl.dart'; @@ -322,12 +323,19 @@ class _TravelAgentListPlansState extends State { children: [ Row( children: [ - Text('My Trips', - style: TextStyle( - fontFamily: "Inter", - fontSize: isDesktop ? 16 : 14, - fontWeight: FontWeight.w600, - color: Color(0xFF212121))), + Text( + 'My Trips', + style: GoogleFonts.poppins( + fontSize: isDesktop ? 16 : 14, + fontWeight: FontWeight.w600, + color: Colors.black, + ), + // style: TextStyle( + // fontFamily: "Inter", + // fontSize: isDesktop ? 16 : 14, + // fontWeight: FontWeight.w600, + // color: Color(0xFF212121)) + ), ], ), diff --git a/lib/Screens/approvals/approval_list.dart b/lib/Screens/approvals/approval_list.dart index 7dc6d75..1d81b88 100644 --- a/lib/Screens/approvals/approval_list.dart +++ b/lib/Screens/approvals/approval_list.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'dart:core'; import 'package:frontend/data/models/plan.dart'; import 'package:go_router/go_router.dart'; +import 'package:google_fonts/google_fonts.dart'; import 'package:http/http.dart' as http; import 'package:flutter/material.dart'; import 'package:frontend/config/apiUrl.dart'; @@ -383,12 +384,19 @@ class _ApprovalListState extends State { children: [ Row( children: [ - Text('My Approvals', - style: TextStyle( - fontFamily: "Inter", - fontSize: isDesktop ? 16 : 14, - fontWeight: FontWeight.w600, - )), + Text( + 'My Approvals', + style: GoogleFonts.poppins( + fontSize: isDesktop ? 16 : 14, + fontWeight: FontWeight.w600, + color: Colors.black, + ), + // style: TextStyle( + // fontFamily: "Inter", + // fontSize: isDesktop ? 16 : 14, + // fontWeight: FontWeight.w600, + // ) + ), ], ), if (isDesktop) diff --git a/lib/Screens/plans/create_plans.dart b/lib/Screens/plans/create_plans.dart index 0dbcb44..47c59d0 100644 --- a/lib/Screens/plans/create_plans.dart +++ b/lib/Screens/plans/create_plans.dart @@ -3,6 +3,7 @@ import 'dart:async'; import 'dart:typed_data'; import 'package:dropdown_search/dropdown_search.dart'; +import 'package:google_fonts/google_fonts.dart'; import 'package:super_tooltip/super_tooltip.dart'; import 'package:web/web.dart' as web; @@ -2188,7 +2189,7 @@ class CreateNewPlansState extends State { print(" layoutColor: ${widget.layoutColor}"); return options.map((option) { return Padding( - padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 0), + padding: const EdgeInsets.symmetric(horizontal: 2, vertical: 0), child: CustomTextFieldWrapper( // color: Color(0xFFF4F4FB), color: Color(0xFFF5F5F5), @@ -2197,7 +2198,7 @@ class CreateNewPlansState extends State { width: option["value"] == "Option 2" ? 185 : 125, // Adjust width conditionally - borderRadius: BorderRadius.circular(25), + borderRadius: BorderRadius.circular(10), isFocused: _selectedOption == option["value"], isDesktop: isDesktop, child: GestureDetector( @@ -2573,11 +2574,16 @@ class CreateNewPlansState extends State { child: TextField( focusNode: _tripTitleFocusNode, controller: _tripTitleController, - style: TextStyle(fontSize: 12), + // style: TextStyle(fontSize: 12), + style: GoogleFonts.poppins( + fontSize: isDesktop ? 16 : 14, + fontWeight: FontWeight.w600, + color: Colors.black, + ), enabled: !widget.isViewMode, decoration: InputDecoration( labelText: "Trip Name", - labelStyle: TextStyle(fontSize: 12, color: Colors.grey), + labelStyle: TextStyle(fontSize: 14, color: Colors.grey), floatingLabelBehavior: FloatingLabelBehavior.never, border: InputBorder.none, contentPadding: EdgeInsets.symmetric(vertical: 16), @@ -2844,10 +2850,9 @@ class CreateNewPlansState extends State { top: 6.0, bottom: 6.0, left: 15, right: 15), child: Text( statusText, - style: TextStyle( - fontFamily: "Roboto", - fontWeight: FontWeight.w400, + style: GoogleFonts.poppins( fontSize: 12, + fontWeight: FontWeight.w400, color: getStatusColor( isApproverApproved ? "Approved" @@ -2856,6 +2861,12 @@ class CreateNewPlansState extends State { : (statusValue ?? ""), ), ), + // style: TextStyle( + // fontFamily: "Roboto", + // fontWeight: FontWeight.w400, + // fontSize: 12, + // + // ), ), ), ], @@ -2866,6 +2877,7 @@ class CreateNewPlansState extends State { // Tooltip if (isStatusExpanded) Positioned( + right: 0, top: 45, // Ensure the tooltip is above the container // left: // MediaQuery.of(context).size.width * 0.06, // align with label @@ -2876,7 +2888,7 @@ class CreateNewPlansState extends State { child: SizedBox( child: Container( width: isDesktop - ? MediaQuery.of(context).size.width * 0.2 + ? MediaQuery.of(context).size.width * 0.25 : MediaQuery.of(context).size.width, padding: const EdgeInsets.all(12), decoration: BoxDecoration( @@ -3001,7 +3013,7 @@ class CreateNewPlansState extends State { side: BorderSide(color: Color(0xFF114D8B), width: 2), ), padding: isDesktop - ? EdgeInsets.symmetric(horizontal: 20, vertical: 12) + ? EdgeInsets.only(top: 6.0, bottom: 6.0, left: 15, right: 15) : EdgeInsets.symmetric(horizontal: 15, vertical: 10), ), onPressed: () { @@ -3013,7 +3025,12 @@ class CreateNewPlansState extends State { if (isDesktop) Text( "Download PDF", - style: TextStyle(fontSize: isDesktop ? 13 : 11), + style: GoogleFonts.poppins( + fontSize: isDesktop ? 13 : 11, + // fontWeight: + // FontWeight.w500, + ), + // style: TextStyle(fontSize: isDesktop ? 13 : 11), ), if (isDesktop) SizedBox(width: 8), // spacing between icon and text diff --git a/lib/Screens/plans/list_plans.dart b/lib/Screens/plans/list_plans.dart index 91d1a9f..0faab5a 100644 --- a/lib/Screens/plans/list_plans.dart +++ b/lib/Screens/plans/list_plans.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'dart:core'; import 'package:frontend/data/models/plan.dart'; import 'package:go_router/go_router.dart'; +import 'package:google_fonts/google_fonts.dart'; import 'package:http/http.dart' as http; import 'package:flutter/material.dart'; import 'package:frontend/config/apiUrl.dart'; @@ -360,12 +361,19 @@ class _ListPlansState extends State { children: [ Row( children: [ - Text('My Trips', - style: TextStyle( - fontFamily: "Inter", - fontSize: isDesktop ? 16 : 14, - fontWeight: FontWeight.w600, - color: Color(0xFF212121))), + Text( + 'My Trips', + style: GoogleFonts.poppins( + fontSize: isDesktop ? 16 : 14, + fontWeight: FontWeight.w600, + color: Colors.black, + ), + // style: TextStyle( + // fontFamily: "Inter", + // fontSize: isDesktop ? 16 : 14, + // fontWeight: FontWeight.w600, + // color: Color(0xFF212121)) + ), ], ), diff --git a/lib/routes/custom_appBar.dart b/lib/routes/custom_appBar.dart index 74adb01..82b7fff 100644 --- a/lib/routes/custom_appBar.dart +++ b/lib/routes/custom_appBar.dart @@ -1,6 +1,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:google_fonts/google_fonts.dart'; import 'package:shared_preferences/shared_preferences.dart'; // don't forget import '../services/apiService.dart'; @@ -180,7 +181,7 @@ class _CustomAppBarState extends State { ? ClipRect( child: Image.network( selectedOrg!['logo'], - width: 100, + width: 130, height: 80, // fit: BoxFit.contain, errorBuilder: (context, error, stackTrace) { @@ -393,18 +394,20 @@ class _CustomAppBarState extends State { buildNavItem("All Trips", _myTravelRequestColor, () => context.go('/listAllPlan'), isSelected: selectedTab == "All Trips"), - const SizedBox(width: 20), + if (userDetails["role"] == "Travel Agent") + const SizedBox(width: 20), if (userDetails["role"] == "Travel Agent") buildNavItem("My Trips", _myTravelRequestColor, () => context.go('/listTravelAgentPlan'), isSelected: selectedTab == "My Trips"), - if (userDetails["role"] != "Travel Agent") ...[ + ...[ const SizedBox(width: 20), buildNavItem("My Trips", _myTravelRequestColor, () => context.go('/listPlan'), isSelected: selectedTab == "My Trips"), ], - const SizedBox(width: 20), + if (userDetails["role"] != "Travel Agent") + const SizedBox(width: 20), buildNavItem("My Approvals", _myApprovalsColor, () { if (userData?["role"] == "Travel Agent") { isSelected: @@ -495,7 +498,7 @@ class _CustomAppBarState extends State { children: [ Text( userData?["role"] ?? '', - style: const TextStyle( + style: GoogleFonts.poppins( fontSize: 12, fontWeight: FontWeight.bold, color: Colors.black, @@ -530,12 +533,17 @@ class _CustomAppBarState extends State { children: [ Text( userData?["name"] ?? "N/A", - style: const TextStyle( + style: GoogleFonts.poppins( fontSize: 14, fontWeight: FontWeight.w500, - fontFamily: "Roboto", color: Colors.black, ), + // style: const TextStyle( + // fontSize: 14, + // fontWeight: FontWeight.w500, + // fontFamily: "Roboto", + // color: Colors.black, + // ), ), const Icon( Icons.arrow_drop_down, @@ -601,9 +609,8 @@ PopupMenuItem buildMenuItem(Map item) { SizedBox(width: 10), // 👈 small space between icon and text Text( item['label'], - style: TextStyle( - fontSize: 13, - fontFamily: "Inter", + style: GoogleFonts.poppins( + fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black87, ), @@ -633,12 +640,14 @@ Widget buildNavItem(String label, Color color, VoidCallback onTap, : null, // no underline when not selected child: Text( label, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - color: color, - fontFamily: "Inter", - ), + style: GoogleFonts.poppins( + fontSize: 12, fontWeight: FontWeight.w500, color: Colors.black), + // style: TextStyle( + // fontSize: 12, + // fontWeight: FontWeight.w600, + // color: color, + // fontFamily: "Inter", + // ), ), ), ), diff --git a/lib/routes/custom_drawer.dart b/lib/routes/custom_drawer.dart index b0b5146..2218aaa 100644 --- a/lib/routes/custom_drawer.dart +++ b/lib/routes/custom_drawer.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:google_fonts/google_fonts.dart'; import 'package:responsive_builder/responsive_builder.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -187,11 +188,12 @@ class _CustomDrawerState extends State { _buildDrawerItem(context, Icons.assessment_outlined, 'My Approvals', '/ApprovalList'), + SizedBox(height: MediaQuery.of(context).size.height * 0.5), Container( margin: const EdgeInsets.all(20), child: Row( mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.end, children: [ Column( mainAxisAlignment: MainAxisAlignment.start, @@ -286,11 +288,17 @@ class _CustomDrawerState extends State { ), title: Text( title, - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - color: Color(0xFF475569), - fontFamily: "Archivo"), + + style: GoogleFonts.poppins( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xFF475569), + ), + // style: TextStyle( + // fontSize: 12, + // fontWeight: FontWeight.w600, + // color: Color(0xFF475569), + // fontFamily: "Archivo"), ), // tileColor: selectedRoute == route ? Colors.blue.shade50 : null, diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index c0be2ee..2083301 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -7,10 +7,12 @@ import Foundation import file_picker import file_selector_macos +import path_provider_foundation import shared_preferences_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index f0b2fc9..0e32a0f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -216,6 +216,14 @@ packages: url: "https://pub.dev" source: hosted version: "14.8.1" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 + url: "https://pub.dev" + source: hosted + version: "6.2.1" html: dependency: transitive description: @@ -408,6 +416,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.1" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: d0d310befe2c8ab9e7f393288ccbb11b60c019c6b5afc21973eeee4dda2b35e9 + url: "https://pub.dev" + source: hosted + version: "2.2.17" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" + url: "https://pub.dev" + source: hosted + version: "2.4.1" path_provider_linux: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 2a4fbaf..5e73fee 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -48,6 +48,7 @@ dependencies: web: ^1.1.0 universal_html: ^2.2.4 super_tooltip: ^2.0.9 + google_fonts: ^6.2.1 dev_dependencies: