google fonts

This commit is contained in:
venbaittech 2025-05-07 11:35:48 +05:30
parent 2b8172d5f4
commit 12310625ef
10 changed files with 158 additions and 56 deletions

View File

@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:core'; import 'dart:core';
import 'package:frontend/data/models/plan.dart'; import 'package:frontend/data/models/plan.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:frontend/config/apiUrl.dart'; import 'package:frontend/config/apiUrl.dart';
@ -331,12 +332,20 @@ class _ListAllPlansState extends State<ListAllPlans> {
children: [ children: [
Row( Row(
children: [ children: [
Text('All Trips', Text(
style: TextStyle( 'All Trips',
fontFamily: "Inter", style: GoogleFonts.poppins(
fontSize: isDesktop ? 16 : 14, fontSize: isDesktop ? 16 : 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: const Color(0xFF212121))), color: Colors.black,
),
// style: TextStyle(
// fontFamily: "Inter",
// fontSize: isDesktop ? 16 : 14,
// fontWeight: FontWeight.w600,
// color: const Color(0xFF212121) )
),
], ],
), ),

View File

@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:core'; import 'dart:core';
import 'package:frontend/data/models/plan.dart'; import 'package:frontend/data/models/plan.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:frontend/config/apiUrl.dart'; import 'package:frontend/config/apiUrl.dart';
@ -322,12 +323,19 @@ class _TravelAgentListPlansState extends State<TravelAgentListPlans> {
children: [ children: [
Row( Row(
children: [ children: [
Text('My Trips', Text(
style: TextStyle( 'My Trips',
fontFamily: "Inter", style: GoogleFonts.poppins(
fontSize: isDesktop ? 16 : 14, fontSize: isDesktop ? 16 : 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF212121))), color: Colors.black,
),
// style: TextStyle(
// fontFamily: "Inter",
// fontSize: isDesktop ? 16 : 14,
// fontWeight: FontWeight.w600,
// color: Color(0xFF212121))
),
], ],
), ),

View File

@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:core'; import 'dart:core';
import 'package:frontend/data/models/plan.dart'; import 'package:frontend/data/models/plan.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:frontend/config/apiUrl.dart'; import 'package:frontend/config/apiUrl.dart';
@ -383,12 +384,19 @@ class _ApprovalListState extends State<ApprovalList> {
children: [ children: [
Row( Row(
children: [ children: [
Text('My Approvals', Text(
style: TextStyle( 'My Approvals',
fontFamily: "Inter", style: GoogleFonts.poppins(
fontSize: isDesktop ? 16 : 14, fontSize: isDesktop ? 16 : 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
)), color: Colors.black,
),
// style: TextStyle(
// fontFamily: "Inter",
// fontSize: isDesktop ? 16 : 14,
// fontWeight: FontWeight.w600,
// )
),
], ],
), ),
if (isDesktop) if (isDesktop)

View File

@ -3,6 +3,7 @@ import 'dart:async';
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:dropdown_search/dropdown_search.dart'; import 'package:dropdown_search/dropdown_search.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:super_tooltip/super_tooltip.dart'; import 'package:super_tooltip/super_tooltip.dart';
import 'package:web/web.dart' as web; import 'package:web/web.dart' as web;
@ -2188,7 +2189,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
print(" layoutColor: ${widget.layoutColor}"); print(" layoutColor: ${widget.layoutColor}");
return options.map((option) { return options.map((option) {
return Padding( return Padding(
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 0), padding: const EdgeInsets.symmetric(horizontal: 2, vertical: 0),
child: CustomTextFieldWrapper( child: CustomTextFieldWrapper(
// color: Color(0xFFF4F4FB), // color: Color(0xFFF4F4FB),
color: Color(0xFFF5F5F5), color: Color(0xFFF5F5F5),
@ -2197,7 +2198,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
width: option["value"] == "Option 2" width: option["value"] == "Option 2"
? 185 ? 185
: 125, // Adjust width conditionally : 125, // Adjust width conditionally
borderRadius: BorderRadius.circular(25), borderRadius: BorderRadius.circular(10),
isFocused: _selectedOption == option["value"], isFocused: _selectedOption == option["value"],
isDesktop: isDesktop, isDesktop: isDesktop,
child: GestureDetector( child: GestureDetector(
@ -2573,11 +2574,16 @@ class CreateNewPlansState extends State<CreateNewPlan> {
child: TextField( child: TextField(
focusNode: _tripTitleFocusNode, focusNode: _tripTitleFocusNode,
controller: _tripTitleController, 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, enabled: !widget.isViewMode,
decoration: InputDecoration( decoration: InputDecoration(
labelText: "Trip Name", labelText: "Trip Name",
labelStyle: TextStyle(fontSize: 12, color: Colors.grey), labelStyle: TextStyle(fontSize: 14, color: Colors.grey),
floatingLabelBehavior: FloatingLabelBehavior.never, floatingLabelBehavior: FloatingLabelBehavior.never,
border: InputBorder.none, border: InputBorder.none,
contentPadding: EdgeInsets.symmetric(vertical: 16), contentPadding: EdgeInsets.symmetric(vertical: 16),
@ -2844,10 +2850,9 @@ class CreateNewPlansState extends State<CreateNewPlan> {
top: 6.0, bottom: 6.0, left: 15, right: 15), top: 6.0, bottom: 6.0, left: 15, right: 15),
child: Text( child: Text(
statusText, statusText,
style: TextStyle( style: GoogleFonts.poppins(
fontFamily: "Roboto",
fontWeight: FontWeight.w400,
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w400,
color: getStatusColor( color: getStatusColor(
isApproverApproved isApproverApproved
? "Approved" ? "Approved"
@ -2856,6 +2861,12 @@ class CreateNewPlansState extends State<CreateNewPlan> {
: (statusValue ?? ""), : (statusValue ?? ""),
), ),
), ),
// style: TextStyle(
// fontFamily: "Roboto",
// fontWeight: FontWeight.w400,
// fontSize: 12,
//
// ),
), ),
), ),
], ],
@ -2866,6 +2877,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
// Tooltip // Tooltip
if (isStatusExpanded) if (isStatusExpanded)
Positioned( Positioned(
right: 0,
top: 45, // Ensure the tooltip is above the container top: 45, // Ensure the tooltip is above the container
// left: // left:
// MediaQuery.of(context).size.width * 0.06, // align with label // MediaQuery.of(context).size.width * 0.06, // align with label
@ -2876,7 +2888,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
child: SizedBox( child: SizedBox(
child: Container( child: Container(
width: isDesktop width: isDesktop
? MediaQuery.of(context).size.width * 0.2 ? MediaQuery.of(context).size.width * 0.25
: MediaQuery.of(context).size.width, : MediaQuery.of(context).size.width,
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -3001,7 +3013,7 @@ class CreateNewPlansState extends State<CreateNewPlan> {
side: BorderSide(color: Color(0xFF114D8B), width: 2), side: BorderSide(color: Color(0xFF114D8B), width: 2),
), ),
padding: isDesktop 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), : EdgeInsets.symmetric(horizontal: 15, vertical: 10),
), ),
onPressed: () { onPressed: () {
@ -3013,7 +3025,12 @@ class CreateNewPlansState extends State<CreateNewPlan> {
if (isDesktop) if (isDesktop)
Text( Text(
"Download PDF", "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) if (isDesktop)
SizedBox(width: 8), // spacing between icon and text SizedBox(width: 8), // spacing between icon and text

View File

@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:core'; import 'dart:core';
import 'package:frontend/data/models/plan.dart'; import 'package:frontend/data/models/plan.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:frontend/config/apiUrl.dart'; import 'package:frontend/config/apiUrl.dart';
@ -360,12 +361,19 @@ class _ListPlansState extends State<ListPlans> {
children: [ children: [
Row( Row(
children: [ children: [
Text('My Trips', Text(
style: TextStyle( 'My Trips',
fontFamily: "Inter", style: GoogleFonts.poppins(
fontSize: isDesktop ? 16 : 14, fontSize: isDesktop ? 16 : 14,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF212121))), color: Colors.black,
),
// style: TextStyle(
// fontFamily: "Inter",
// fontSize: isDesktop ? 16 : 14,
// fontWeight: FontWeight.w600,
// color: Color(0xFF212121))
),
], ],
), ),

View File

@ -1,6 +1,7 @@
import 'dart:convert'; import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:go_router/go_router.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 'package:shared_preferences/shared_preferences.dart'; // don't forget
import '../services/apiService.dart'; import '../services/apiService.dart';
@ -180,7 +181,7 @@ class _CustomAppBarState extends State<CustomAppBar> {
? ClipRect( ? ClipRect(
child: Image.network( child: Image.network(
selectedOrg!['logo'], selectedOrg!['logo'],
width: 100, width: 130,
height: 80, height: 80,
// fit: BoxFit.contain, // fit: BoxFit.contain,
errorBuilder: (context, error, stackTrace) { errorBuilder: (context, error, stackTrace) {
@ -393,17 +394,19 @@ class _CustomAppBarState extends State<CustomAppBar> {
buildNavItem("All Trips", _myTravelRequestColor, buildNavItem("All Trips", _myTravelRequestColor,
() => context.go('/listAllPlan'), () => context.go('/listAllPlan'),
isSelected: selectedTab == "All Trips"), isSelected: selectedTab == "All Trips"),
if (userDetails["role"] == "Travel Agent")
const SizedBox(width: 20), const SizedBox(width: 20),
if (userDetails["role"] == "Travel Agent") if (userDetails["role"] == "Travel Agent")
buildNavItem("My Trips", _myTravelRequestColor, buildNavItem("My Trips", _myTravelRequestColor,
() => context.go('/listTravelAgentPlan'), () => context.go('/listTravelAgentPlan'),
isSelected: selectedTab == "My Trips"), isSelected: selectedTab == "My Trips"),
if (userDetails["role"] != "Travel Agent") ...[ ...[
const SizedBox(width: 20), const SizedBox(width: 20),
buildNavItem("My Trips", _myTravelRequestColor, buildNavItem("My Trips", _myTravelRequestColor,
() => context.go('/listPlan'), () => context.go('/listPlan'),
isSelected: selectedTab == "My Trips"), isSelected: selectedTab == "My Trips"),
], ],
if (userDetails["role"] != "Travel Agent")
const SizedBox(width: 20), const SizedBox(width: 20),
buildNavItem("My Approvals", _myApprovalsColor, () { buildNavItem("My Approvals", _myApprovalsColor, () {
if (userData?["role"] == "Travel Agent") { if (userData?["role"] == "Travel Agent") {
@ -495,7 +498,7 @@ class _CustomAppBarState extends State<CustomAppBar> {
children: [ children: [
Text( Text(
userData?["role"] ?? '', userData?["role"] ?? '',
style: const TextStyle( style: GoogleFonts.poppins(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
@ -530,12 +533,17 @@ class _CustomAppBarState extends State<CustomAppBar> {
children: [ children: [
Text( Text(
userData?["name"] ?? "N/A", userData?["name"] ?? "N/A",
style: const TextStyle( style: GoogleFonts.poppins(
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontFamily: "Roboto",
color: Colors.black, color: Colors.black,
), ),
// style: const TextStyle(
// fontSize: 14,
// fontWeight: FontWeight.w500,
// fontFamily: "Roboto",
// color: Colors.black,
// ),
), ),
const Icon( const Icon(
Icons.arrow_drop_down, Icons.arrow_drop_down,
@ -601,9 +609,8 @@ PopupMenuItem<String> buildMenuItem(Map<String, dynamic> item) {
SizedBox(width: 10), // 👈 small space between icon and text SizedBox(width: 10), // 👈 small space between icon and text
Text( Text(
item['label'], item['label'],
style: TextStyle( style: GoogleFonts.poppins(
fontSize: 13, fontSize: 12,
fontFamily: "Inter",
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Colors.black87, color: Colors.black87,
), ),
@ -633,12 +640,14 @@ Widget buildNavItem(String label, Color color, VoidCallback onTap,
: null, // no underline when not selected : null, // no underline when not selected
child: Text( child: Text(
label, label,
style: TextStyle( style: GoogleFonts.poppins(
fontSize: 12, fontSize: 12, fontWeight: FontWeight.w500, color: Colors.black),
fontWeight: FontWeight.w600, // style: TextStyle(
color: color, // fontSize: 12,
fontFamily: "Inter", // fontWeight: FontWeight.w600,
), // color: color,
// fontFamily: "Inter",
// ),
), ),
), ),
), ),

View File

@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:responsive_builder/responsive_builder.dart'; import 'package:responsive_builder/responsive_builder.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -187,11 +188,12 @@ class _CustomDrawerState extends State<CustomDrawer> {
_buildDrawerItem(context, Icons.assessment_outlined, _buildDrawerItem(context, Icons.assessment_outlined,
'My Approvals', '/ApprovalList'), 'My Approvals', '/ApprovalList'),
SizedBox(height: MediaQuery.of(context).size.height * 0.5),
Container( Container(
margin: const EdgeInsets.all(20), margin: const EdgeInsets.all(20),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
@ -286,11 +288,17 @@ class _CustomDrawerState extends State<CustomDrawer> {
), ),
title: Text( title: Text(
title, title,
style: TextStyle(
style: GoogleFonts.poppins(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xFF475569), color: Color(0xFF475569),
fontFamily: "Archivo"), ),
// style: TextStyle(
// fontSize: 12,
// fontWeight: FontWeight.w600,
// color: Color(0xFF475569),
// fontFamily: "Archivo"),
), ),
// tileColor: selectedRoute == route ? Colors.blue.shade50 : null, // tileColor: selectedRoute == route ? Colors.blue.shade50 : null,

View File

@ -7,10 +7,12 @@ import Foundation
import file_picker import file_picker
import file_selector_macos import file_selector_macos
import path_provider_foundation
import shared_preferences_foundation import shared_preferences_foundation
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin")) FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
} }

View File

@ -216,6 +216,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "14.8.1" 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: html:
dependency: transitive dependency: transitive
description: description:
@ -408,6 +416,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" 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: path_provider_linux:
dependency: transitive dependency: transitive
description: description:

View File

@ -48,6 +48,7 @@ dependencies:
web: ^1.1.0 web: ^1.1.0
universal_html: ^2.2.4 universal_html: ^2.2.4
super_tooltip: ^2.0.9 super_tooltip: ^2.0.9
google_fonts: ^6.2.1
dev_dependencies: dev_dependencies: