UI_BUGFIX

This commit is contained in:
venbaittech 2025-11-07 10:17:58 +05:30
parent cb82278834
commit 705731d2ab
15 changed files with 7126 additions and 6534 deletions

View File

@ -32,7 +32,6 @@ import 'package:nhance_app_pwa/pages/session/SetPinBiometric.dart';
import 'package:nhance_app_pwa/pages/session/changePin.dart';
import 'package:nhance_app_pwa/pages/session/settingUpPinAndBiometric.dart';
import 'package:nhance_app_pwa/pages/verify.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'models/environment.dart';
@ -65,8 +64,6 @@ class _SplashScreenState extends State<SplashScreen> {
} else {
if (mounted) context.go('/login');
}
}
@override
@ -82,7 +79,6 @@ class _SplashScreenState extends State<SplashScreen> {
}
}
/// Middleware logic for tokens + mpin
Future<String?> tokenRedirectLogic(
BuildContext context, GoRouterState state) async {
@ -110,7 +106,8 @@ Future<String?> tokenRedirectLogic(
await SessionManager().clear();
// Show toast once
WidgetsBinding.instance.addPostFrameCallback((_) {
ToastHelper.showErrorToast(context, 'Session expired. Please login again.');
ToastHelper.showErrorToast(
context, 'Session expired. Please login again.');
});
return '/login';
}
@ -192,7 +189,8 @@ Future<void> main() async {
final router = GoRouter(
initialLocation: initialLocation,
routes: [
GoRoute(path: '/splash', builder: (context, state) => const SplashScreen()),
GoRoute(
path: '/splash', builder: (context, state) => const SplashScreen()),
GoRoute(path: '/login', builder: (context, state) => login()),
// GoRoute(
// path: '/verify',
@ -241,7 +239,9 @@ Future<void> main() async {
// ),
// GoRoute(path: '/mailVerify', builder: (context, state) => MyEmailVerify(email: '')),
GoRoute(path: '/pinPage', builder: (context, state) => pinPage()),
GoRoute(path: '/pinSettingPage', builder: (context, state) => pinSettingPage()),
GoRoute(
path: '/pinSettingPage',
builder: (context, state) => pinSettingPage()),
GoRoute(
path: '/changePin',
builder: (context, state) => changePin(),
@ -249,24 +249,31 @@ Future<void> main() async {
GoRoute(path: '/home', builder: (context, state) => Home()),
GoRoute(path: '/profile', builder: (context, state) => profile()),
GoRoute(path: '/help', builder: (context, state) => help()),
GoRoute(path: '/claimprocess', builder: (context, state) => claimprocess()),
GoRoute(
path: '/claimprocess', builder: (context, state) => claimprocess()),
GoRoute(path: '/wellness', builder: (context, state) => wellness()),
GoRoute(path: '/privacypolicy', builder: (context, state) => privacypolicy()),
GoRoute(
path: '/privacypolicy', builder: (context, state) => privacypolicy()),
GoRoute(path: '/termsofuse', builder: (context, state) => termsofuse()),
GoRoute(path: '/generalExclusionsDeductibles', builder: (context, state) => generalExclusionsDeductibles()),
GoRoute(path: '/raisedTicketHistory', builder: (context, state) => raisedTicketHistory()),
GoRoute(
path: '/generalExclusionsDeductibles',
builder: (context, state) => generalExclusionsDeductibles()),
GoRoute(
path: '/raisedTicketHistory',
builder: (context, state) => raisedTicketHistory()),
GoRoute(path: '/tickets', builder: (context, state) => tickets()),
GoRoute(
path: '/policies',
builder: (context, state) {
final arguments = state.extra as Map<String, dynamic>?; // 👈 receive here
final arguments =
state.extra as Map<String, dynamic>?; // 👈 receive here
return policies(arguments: arguments);
},
),
GoRoute(
path: '/claims',
builder: (context, state) {
final int tabIndex = state.extra as int? ?? 1 ; // default to 0
final int tabIndex = state.extra as int? ?? 0; // default to 0
return claims(initialTab: tabIndex);
},
),
@ -284,9 +291,15 @@ Future<void> main() async {
return tickettracklist(ticketID: ticketID);
},
),
GoRoute(path: '/empDetails',builder:(context,state) => empDetails(),),
GoRoute(path: '/addOnsDetails', builder: (context, state) => addOnsDetails()),
GoRoute(path: '/empReviewDetails', builder: (context, state) => empReviewDetails()),
GoRoute(
path: '/empDetails',
builder: (context, state) => empDetails(),
),
GoRoute(
path: '/addOnsDetails', builder: (context, state) => addOnsDetails()),
GoRoute(
path: '/empReviewDetails',
builder: (context, state) => empReviewDetails()),
],
// Middleware hook
@ -327,7 +340,6 @@ class _MyAppState extends State<MyApp> {
DataManager().init(apiService);
DataManager().loadAdvertisementImages();
});
}
@override

View File

@ -2,6 +2,7 @@
// import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:nhance_app_pwa/pages/postEnrollment/service/api_service.dart';
@ -159,8 +160,8 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
try {
final response = await http.post(
Uri.parse(Environment.apiUrl + 'storeFireBase'),
body: json
.encode({'mobile': session.mobileNo, 'firebase_token': deviceToken}),
body: json.encode(
{'mobile': session.mobileNo, 'firebase_token': deviceToken}),
headers: {
HttpHeaders.contentTypeHeader: 'application/json',
'Authorization': 'Bearer $_preToken',
@ -208,8 +209,7 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
final response = await http.post(
Uri.parse(Environment.apiUrlEnrollment + 'getVerifiedUserData'),
body:
json.encode(payload),
body: json.encode(payload),
headers: {
HttpHeaders.contentTypeHeader: 'application/json',
},
@ -238,7 +238,8 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
}
String? postToken;
if (data['post_enrollment'] != null && data['post_enrollment']['data'] is String) {
if (data['post_enrollment'] != null &&
data['post_enrollment']['data'] is String) {
postToken = data['post_enrollment']['data'];
}
@ -548,7 +549,6 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
ToastHelper.showSuccessToast(
context, 'Verification code sent to ${widget.value}');
}
} else {
ToastHelper.showErrorToast(context, message);
print('Invalid mobile number');
@ -647,7 +647,8 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
}
Future<void> getClientLogoAndDetails() async {
var url = Uri.parse(Environment.apiUrlEnrollment + 'getClientDetails?post_client_id=${session.client_id}&post_branch_id=${session.empClientBranchId}&pre_client_id=${session.enrollmentClient_id}&pre_branch_id=${session.enrollmentEmpClientBranchId}');
var url = Uri.parse(Environment.apiUrlEnrollment +
'getClientDetails?post_client_id=${session.client_id}&post_branch_id=${session.empClientBranchId}&pre_client_id=${session.enrollmentClient_id}&pre_branch_id=${session.enrollmentEmpClientBranchId}');
try {
var response = await http.get(
url,
@ -664,8 +665,10 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
if (data.containsKey('data')) {
dynamic clientDetails = data['data'];
final SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.setString('clientLogo', clientDetails['client']['client_logo']);
await prefs.setString('clientName', clientDetails['client']['client_name']);
await prefs.setString(
'clientLogo', clientDetails['client']['client_logo']);
await prefs.setString(
'clientName', clientDetails['client']['client_name']);
await prefs.setString(
'addon_subheading', clientDetails['client']['addon_subheading']);
setState(() {
@ -940,16 +943,20 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
color: Color(0xFF000000)),
children: [
TextSpan(
text: widget.type == 'mobile' ? 'mobile number ${widget.value}' : 'Email Id ${widget.value}',
text: widget.type == 'mobile'
? 'mobile number ${widget.value}'
: 'Email Id ${widget.value}',
),
TextSpan(
text: widget.type == 'mobile' ? ' (Change Mobile)' : ' (Change Email)',
text: widget.type == 'mobile'
? ' (Change Mobile)'
: ' (Change Email)',
style: TextStyle(
fontSize: 12,
color: Color(
0xFFE26728)
), // Change color as desired
recognizer: TapGestureRecognizer()
0xFFE26728)), // Change color as desired
recognizer:
TapGestureRecognizer()
..onTap = () {
context.go('/login');
// Navigator.pushNamed(
@ -972,6 +979,11 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
// defaultPinTheme: defaultPinTheme,
// focusedPinTheme: focusedPinTheme,
// submittedPinTheme: submittedPinTheme,
inputFormatters: [
FilteringTextInputFormatter
.digitsOnly, // allows only 09
],
keyboardType: TextInputType.number,
showCursor: true,
controller: _otpController,
),

View File

@ -134,7 +134,8 @@ class _empDetailsState extends State<empDetails> {
Future<void> getTokenStatus() async {
// final SharedPreferences prefs = await SharedPreferences.getInstance();
setState(() async {
isTokenAvailable = (await TokenService.getPostToken())?.isNotEmpty ?? false;
isTokenAvailable =
(await TokenService.getPostToken())?.isNotEmpty ?? false;
print('isTokenAvailable $isTokenAvailable');
});
}
@ -149,7 +150,8 @@ class _empDetailsState extends State<empDetails> {
// Decode the JWT token received from the API response
enrollmentEmpClientBranchId = session.enrollmentEmpClientBranchId;
enrollmentEmpCodeString = session.enrollmentEmpCodeString;
print('enrollmentEmpCodeString : $enrollmentEmpCodeString'); // Check if emp_code is correct
print(
'enrollmentEmpCodeString : $enrollmentEmpCodeString'); // Check if emp_code is correct
enrollmentEmpPrimaryId = session.enrollmentEmpPrimaryId;
enrollmentGpaEmpName = session.enrollmentGpaEmpName;
enrollmentClient_id = session.enrollmentClient_id;
@ -230,7 +232,9 @@ class _empDetailsState extends State<empDetails> {
// enrollmentEmpClientBranchId == null) {
// return;
// }
final response = await apiService.getClientLogoAndDetailsToApi(empClientId,empClientBranchId,
final response = await apiService.getClientLogoAndDetailsToApi(
empClientId,
empClientBranchId,
enrollmentClient_id!,
enrollmentEmpClientBranchId!);
print('check 1');
@ -481,6 +485,16 @@ class _empDetailsState extends State<empDetails> {
}
}
String formatDate(String inputDate) {
// Parse the input date string
DateTime dateTime = DateFormat('dd-MM-yyyy').parse(inputDate);
// Format the date to the desired format
String formattedDate = DateFormat('dd MMM yyyy').format(dateTime);
return formattedDate;
}
Future<void> deleteItem(Map<String, dynamic> deletedItem) async {
print(deletedItem);
try {
@ -733,8 +747,8 @@ class _empDetailsState extends State<empDetails> {
if (loadingProgress == null) return child;
return Center(
child: CircularProgressIndicator(
value:
loadingProgress.expectedTotalBytes !=
value: loadingProgress
.expectedTotalBytes !=
null
? loadingProgress
.cumulativeBytesLoaded /
@ -842,6 +856,26 @@ class _empDetailsState extends State<empDetails> {
right: 10), // Add padding to the container
child: Row(
children: [
InkWell(
onTap: () {
context.go('/home');
},
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
// if (!Responsive.isDesktop(context))
Icon(
Icons.chevron_left,
color: Color(0xFF000000),
size: 30,
),
SizedBox(
width: Responsive.isDesktop(context)
? 0
: 5),
],
),
),
Expanded(
flex: 6,
child: Container(
@ -858,8 +892,8 @@ class _empDetailsState extends State<empDetails> {
if (loadingProgress == null) return child;
return Center(
child: CircularProgressIndicator(
value:
loadingProgress.expectedTotalBytes !=
value: loadingProgress
.expectedTotalBytes !=
null
? loadingProgress
.cumulativeBytesLoaded /
@ -951,7 +985,8 @@ class _empDetailsState extends State<empDetails> {
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFFE26728),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
borderRadius:
BorderRadius.circular(5),
),
),
),
@ -1041,7 +1076,8 @@ class _empDetailsState extends State<empDetails> {
],
initialIndex:
0, // Initial index of the bottom navigation bar
) : null,
)
: null,
));
}
}
@ -1111,12 +1147,13 @@ class _empDetailsState extends State<empDetails> {
// Set values to all fields
_relationShipController.text = floaterData['relationship'] ?? '';
_memberNameController.text = floaterData['name'] ?? '';
_dobController.text = floaterData['dob'] ?? '';
_dobController.text = formatDate(floaterData['dob']) ?? '';
// Add more fields as needed
}
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return AlertDialog(
shape: RoundedRectangleBorder(
@ -1831,7 +1868,7 @@ class _empDetailsState extends State<empDetails> {
),
),
Text(
'${floaterData['relationship']} - ${floaterData['dob']}' ??
'${floaterData['relationship']} - ${formatDate(floaterData['dob'])}' ??
'NA',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
@ -2332,7 +2369,7 @@ class _empDetailsState extends State<empDetails> {
),
),
Text(
'${floaterData['relationship']} - ${floaterData['dob']}',
'${floaterData['relationship']} - ${formatDate(floaterData['dob'])}',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context) ? 18 : 16,
@ -2359,17 +2396,24 @@ class _empDetailsState extends State<empDetails> {
onTap: () {
deleteItem(floaterData);
},
child: Text(
'Delete',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
? 16
: 15,
color: Color(
0xFFE26728), // Add underline decoration
child: Tooltip(
message: 'Delete',
child: Icon(
Icons.delete,
color: Color(0xFFE26728),
),
),
// child: Text(
// 'Delete',
// textAlign: TextAlign.left,
// style: GoogleFonts.poppins(
// fontSize: Responsive.isDesktop(context)
// ? 16
// : 15,
// color: Color(
// 0xFFE26728), // Add underline decoration
// ),
// ),
),
)
],
@ -2383,15 +2427,16 @@ class _empDetailsState extends State<empDetails> {
floaterData['relationship'] != 'Self')
? Responsive.isDesktop(context)
? 1
: 2
: 4
: Responsive.isDesktop(context)
? 2
? 1
: 4,
child: Container(
alignment: Alignment.topRight,
// alignment: Alignment.topRight,
// color: Colors.yellow,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MouseRegion(
cursor: SystemMouseCursors.click,
@ -2404,17 +2449,32 @@ class _empDetailsState extends State<empDetails> {
floaterData, 'Edit', gmcSumInsured);
}
},
child: Text(
floaterData['relationship'] == 'Self'
? 'View'
: 'Edit',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
? 16
: 15,
color: Color(
0xFFE26728), // Add underline decoration
// child: Text(
// floaterData['relationship'] == 'Self'
// ? 'View'
// : 'Edit',
// textAlign: TextAlign.left,
// style: GoogleFonts.poppins(
// fontSize: Responsive.isDesktop(context)
// ? 16
// : 15,
// color: Color(
// 0xFFE26728), // Add underline decoration
// ),
// ),
child: floaterData['relationship'] == 'Self'
? Tooltip(
message: 'View',
child: Icon(
Icons.remove_red_eye,
color: const Color(0xFFE26728),
),
)
: Tooltip(
message: 'Edit',
child: Icon(
Icons.edit,
color: const Color(0xFFE26728),
),
),
),

File diff suppressed because it is too large Load Diff

View File

@ -674,7 +674,20 @@ class _loginState extends State<login> {
SizedBox(width: 10),
SizedBox(
width: 40,
child: TextField(
// child: TextField(
// controller:
// countryController,
// keyboardType:
// TextInputType
// .number,
// decoration:
// InputDecoration(
// border:
// InputBorder
// .none,
// ),
// ),
child: TextFormField(
controller:
countryController,
keyboardType:
@ -686,6 +699,23 @@ class _loginState extends State<login> {
InputBorder
.none,
),
validator: (value) {
if (value ==
null ||
value
.isEmpty) {
return 'Required';
}
return null;
},
inputFormatters: [
FilteringTextInputFormatter
.allow(RegExp(
r'[0-9+]')),
LengthLimitingTextInputFormatter(
3),
],
),
),
Text(

View File

@ -17,7 +17,6 @@ import '../service/SessionManager.dart';
import '../service/TokenService.dart';
import '../service/popup_helper.dart';
class claimprocess extends StatefulWidget {
const claimprocess({Key? key}) : super(key: key);
@ -73,11 +72,9 @@ class _claimprocessState extends State<claimprocess> {
}
}
Future<void> getCashlessAndReimbursement() async {
final response = await apiService.getCashlessAndReimbursementToApi();
print('check 1');
print('check 1 getCashlessAndReimbursement');
if (response['status'] == 'success') {
print(response['data']);
setState(() {
@ -161,9 +158,10 @@ class _claimprocessState extends State<claimprocess> {
context.go('/claims');
},
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
if (!Responsive.isDesktop(context))
// if (!Responsive.isDesktop(context))
Icon(
Icons.chevron_left,
color: Color(0xFF000000),
@ -220,7 +218,8 @@ class _claimprocessState extends State<claimprocess> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Expanded(
flex: 6,
@ -234,37 +233,43 @@ class _claimprocessState extends State<claimprocess> {
? Material(
elevation: 5,
borderRadius:
BorderRadius.circular(10),
BorderRadius.circular(
10),
color: Colors.white,
child: TextButton(
onPressed: () {},
style: TextButton.styleFrom(
padding:
EdgeInsets.symmetric(
horizontal:
Responsive.isDesktop(
style:
TextButton.styleFrom(
padding: EdgeInsets
.symmetric(
horizontal: Responsive
.isDesktop(
context)
? 80
: 40,
vertical:
Responsive.isDesktop(
vertical: Responsive
.isDesktop(
context)
? 12
: 7,
),
),
child: Text(
cashLessSectionName ?? '',
textAlign: TextAlign.center,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(
cashLessSectionName ??
'',
textAlign:
TextAlign.center,
style:
GoogleFonts.poppins(
fontSize: Responsive
.isDesktop(
context)
? 18
: 14,
fontWeight:
FontWeight.w500,
color: Color(0xFF593AFF),
color:
Color(0xFF593AFF),
),
),
),
@ -278,7 +283,8 @@ class _claimprocessState extends State<claimprocess> {
context)
? 18
: 14,
fontWeight: FontWeight.w400,
fontWeight:
FontWeight.w400,
color: Color(0xFF636363),
),
),
@ -296,26 +302,48 @@ class _claimprocessState extends State<claimprocess> {
? Material(
elevation: 5,
borderRadius:
BorderRadius.circular(10),
BorderRadius.circular(
10),
color: Colors.white,
child: TextButton(
onPressed: () {},
style: TextButton.styleFrom(
padding:
EdgeInsets.symmetric(
horizontal:
Responsive.isDesktop(
style:
TextButton.styleFrom(
padding: EdgeInsets
.symmetric(
horizontal: Responsive
.isDesktop(
context)
? 80
: 40,
vertical:
Responsive.isDesktop(
vertical: Responsive
.isDesktop(
context)
? 12
: 7,
),
),
child: Text(
reimbursementSectionName ??
'',
textAlign:
TextAlign.center,
style:
GoogleFonts.poppins(
fontSize: Responsive
.isDesktop(
context)
? 18
: 14,
fontWeight:
FontWeight.w500,
color:
Color(0xFF593AFF),
),
),
),
)
: Text(
reimbursementSectionName ??
'',
textAlign: TextAlign.center,
@ -326,22 +354,7 @@ class _claimprocessState extends State<claimprocess> {
? 18
: 14,
fontWeight:
FontWeight.w500,
color: Color(0xFF593AFF),
),
),
),
)
: Text(
reimbursementSectionName ?? '',
textAlign: TextAlign.center,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(
context)
? 18
: 14,
fontWeight: FontWeight.w400,
FontWeight.w400,
color: Color(0xFF636363),
),
),
@ -363,21 +376,25 @@ class _claimprocessState extends State<claimprocess> {
borderRadius: BorderRadius.circular(5),
),
padding: Responsive.isDesktop(context)
? EdgeInsets.symmetric(vertical: 15, horizontal: 25)
? EdgeInsets.symmetric(
vertical: 15, horizontal: 25)
: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (cashLessClaimsDetails != null)
Padding(
padding: EdgeInsets.only(bottom: 20, left: 15),
padding:
EdgeInsets.only(bottom: 20, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
cashLessHeading ?? '',
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 18
: 16,
fontWeight: FontWeight.w500,
@ -390,7 +407,8 @@ class _claimprocessState extends State<claimprocess> {
double itemHeight =
40; // Adjust item height based on content
double listViewHeight =
cashLessContent.length * itemHeight;
cashLessContent.length *
itemHeight;
double maxHeight =
constraints.maxHeight;
@ -401,46 +419,52 @@ class _claimprocessState extends State<claimprocess> {
return Container(
height: listViewHeight,
child: ListView.builder(
itemCount: cashLessContent.length,
itemCount:
cashLessContent.length,
itemBuilder: (context, index) {
String key = cashLessContent.keys
String key = cashLessContent
.keys
.elementAt(index);
String value =
cashLessContent[key]!;
return Padding(
padding:
const EdgeInsets.symmetric(
padding: const EdgeInsets
.symmetric(
vertical: 8.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: <Widget>[
Padding(
padding:
const EdgeInsets.only(
const EdgeInsets
.only(
left: 20.0),
child: Text(
"",
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFFE26728),
FontWeight
.w400,
color: Color(
0xFFE26728),
),
),
),
Expanded(
child: Text(
value,
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFF000000),
FontWeight
.w400,
color: Color(
0xFF000000),
),
),
),
@ -457,14 +481,17 @@ class _claimprocessState extends State<claimprocess> {
),
if (cashLessClaimsDetails != null)
Padding(
padding: EdgeInsets.only(bottom: 20, left: 15),
padding:
EdgeInsets.only(bottom: 20, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Notes',
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 18
: 16,
fontWeight: FontWeight.w500,
@ -477,7 +504,8 @@ class _claimprocessState extends State<claimprocess> {
double itemHeight =
70; // Adjust item height based on content
double listViewHeight =
cashLessNotes.length * itemHeight;
cashLessNotes.length *
itemHeight;
double maxHeight =
constraints.maxHeight;
@ -490,44 +518,49 @@ class _claimprocessState extends State<claimprocess> {
child: ListView.builder(
itemCount: cashLessNotes.length,
itemBuilder: (context, index) {
String key = cashLessNotes.keys
String key = cashLessNotes
.keys
.elementAt(index);
String value =
cashLessNotes[key]!;
return Padding(
padding:
const EdgeInsets.symmetric(
padding: const EdgeInsets
.symmetric(
vertical: 8.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: <Widget>[
Padding(
padding:
const EdgeInsets.only(
const EdgeInsets
.only(
left: 20.0),
child: Text(
"",
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFFE26728),
FontWeight
.w400,
color: Color(
0xFFE26728),
),
),
),
Expanded(
child: Text(
value,
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFF000000),
FontWeight
.w400,
color: Color(
0xFF000000),
),
),
),
@ -550,21 +583,25 @@ class _claimprocessState extends State<claimprocess> {
borderRadius: BorderRadius.circular(5),
),
padding: Responsive.isDesktop(context)
? EdgeInsets.symmetric(vertical: 15, horizontal: 25)
? EdgeInsets.symmetric(
vertical: 15, horizontal: 25)
: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (reimbursementClaimsDetails != null)
Padding(
padding: EdgeInsets.only(bottom: 20, left: 15),
padding:
EdgeInsets.only(bottom: 20, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
reimbursementHeading ?? '',
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 18
: 16,
fontWeight: FontWeight.w500,
@ -592,45 +629,50 @@ class _claimprocessState extends State<claimprocess> {
itemCount:
reimbursementContent.length,
itemBuilder: (context, index) {
String key = reimbursementContent
.keys
String key =
reimbursementContent.keys
.elementAt(index);
String value =
reimbursementContent[key]!;
reimbursementContent[
key]!;
return Padding(
padding:
const EdgeInsets.symmetric(
padding: const EdgeInsets
.symmetric(
vertical: 8.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: <Widget>[
Padding(
padding:
const EdgeInsets.only(
const EdgeInsets
.only(
left: 20.0),
child: Text(
"",
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFFE26728),
FontWeight
.w400,
color: Color(
0xFFE26728),
),
),
),
Expanded(
child: Text(
value,
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFF000000),
FontWeight
.w400,
color: Color(
0xFF000000),
),
),
),
@ -647,14 +689,17 @@ class _claimprocessState extends State<claimprocess> {
),
if (reimbursementClaimsDetails != null)
Padding(
padding: EdgeInsets.only(bottom: 20, left: 15),
padding:
EdgeInsets.only(bottom: 20, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Notes',
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 18
: 16,
fontWeight: FontWeight.w500,
@ -682,45 +727,49 @@ class _claimprocessState extends State<claimprocess> {
itemCount:
reimbursementNotes.length,
itemBuilder: (context, index) {
String key = reimbursementNotes
.keys
String key =
reimbursementNotes.keys
.elementAt(index);
String value =
reimbursementNotes[key]!;
return Padding(
padding:
const EdgeInsets.symmetric(
padding: const EdgeInsets
.symmetric(
vertical: 8.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: <Widget>[
Padding(
padding:
const EdgeInsets.only(
const EdgeInsets
.only(
left: 20.0),
child: Text(
"",
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFFE26728),
FontWeight
.w400,
color: Color(
0xFFE26728),
),
),
),
Expanded(
child: Text(
value,
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFF000000),
FontWeight
.w400,
color: Color(
0xFF000000),
),
),
),
@ -799,7 +848,6 @@ class _claimprocessState extends State<claimprocess> {
"Wellness",
],
),
)
);
));
}
}

View File

@ -283,8 +283,12 @@ class _claimsState extends State<claims> {
flex: 12,
child: InkWell(
onTap: () {
print("CACLAIMS - ${widget.initialTab}");
if (widget.initialTab == 2) {
context.go('/home');
}
if (widget.initialTab == 0) {
context.go('/home');
} else {
context.pop();
}
@ -303,10 +307,11 @@ class _claimsState extends State<claims> {
5), // Adjust space between icon and text
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Claims assistance',
'Claims Assistance',
textAlign: TextAlign.start,
style: GoogleFonts.poppins(
fontSize: 16,
@ -385,7 +390,8 @@ class _claimsState extends State<claims> {
'Contact Us',
textAlign: TextAlign.center,
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 18
: 12,
fontWeight: FontWeight.w500,
@ -428,7 +434,8 @@ class _claimsState extends State<claims> {
elevation: 0,
shape: RoundedRectangleBorder(
side: BorderSide(
color: Color(0xFFD9D9D9), // Set the border color here
color:
Color(0xFFD9D9D9), // Set the border color here
width: 1.0, // Set the border width here
),
borderRadius: BorderRadius.circular(
@ -465,7 +472,8 @@ class _claimsState extends State<claims> {
'Know how to file a claim',
textAlign: TextAlign.center,
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 18
: 12,
fontWeight: FontWeight.w500,
@ -498,14 +506,16 @@ class _claimsState extends State<claims> {
SizedBox(height: 15),
Container(
decoration: BoxDecoration(
color:
Color(0xFFF6FAFF), // Set background color for the container
color: Color(
0xFFF6FAFF), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: Responsive.isDesktop(context)
? EdgeInsets.only(top: 10, bottom: 10, left: 25, right: 25)
: EdgeInsets.only(top: 10, bottom: 10, left: 10, right: 10),
? EdgeInsets.only(
top: 10, bottom: 10, left: 25, right: 25)
: EdgeInsets.only(
top: 10, bottom: 10, left: 10, right: 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@ -538,11 +548,13 @@ class _claimsState extends State<claims> {
? Material(
elevation: 5,
borderRadius:
BorderRadius.circular(10),
BorderRadius.circular(
10),
color: Colors.white,
child: TextButton(
onPressed: () {},
style: TextButton.styleFrom(
style: TextButton
.styleFrom(
padding: EdgeInsets.symmetric(
horizontal: Responsive
.isDesktop(
@ -565,7 +577,8 @@ class _claimsState extends State<claims> {
? 18
: 13,
fontWeight:
FontWeight.w500,
FontWeight
.w500,
color: Color(
0xFF000000)),
),
@ -573,14 +586,17 @@ class _claimsState extends State<claims> {
)
: Text(
'Your Plan',
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(
style:
GoogleFonts.poppins(
fontSize: Responsive
.isDesktop(
context)
? 18
: 13,
fontWeight: FontWeight.w400,
color: Color(0xFF636363),
fontWeight:
FontWeight.w400,
color:
Color(0xFF636363),
),
),
),
@ -603,11 +619,13 @@ class _claimsState extends State<claims> {
? Material(
elevation: 5,
borderRadius:
BorderRadius.circular(10),
BorderRadius.circular(
10),
color: Colors.white,
child: TextButton(
onPressed: () {},
style: TextButton.styleFrom(
style: TextButton
.styleFrom(
padding: EdgeInsets.symmetric(
horizontal: Responsive
.isDesktop(
@ -623,15 +641,15 @@ class _claimsState extends State<claims> {
),
child: Text(
'Track claims',
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: Responsive
.isDesktop(
context)
? 18
: 13,
color:
Color(0xFF000000),
color: Color(
0xFF000000),
fontWeight:
FontWeight.w500,
),
@ -640,14 +658,17 @@ class _claimsState extends State<claims> {
)
: Text(
'Track claims',
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(
style:
GoogleFonts.poppins(
fontSize: Responsive
.isDesktop(
context)
? 18
: 13,
fontWeight: FontWeight.w400,
color: Color(0xFF636363),
fontWeight:
FontWeight.w400,
color:
Color(0xFF636363),
),
),
),
@ -749,8 +770,7 @@ class _claimsState extends State<claims> {
],
initialIndex: 1, // Initial index of the bottom navigation bar
),
)
);
));
}
List<Widget> generateYourPlanList(List<dynamic> data) {

View File

@ -67,7 +67,6 @@ class _generalExclusionsDeductiblesState
final session = SessionManager();
@override
void initState() {
super.initState();
@ -96,8 +95,6 @@ class _generalExclusionsDeductiblesState
}
}
Future<void> getCashlessAndReimbursement() async {
final response = await apiService.getCashlessAndReimbursementToApi();
print('check 1');
@ -201,9 +198,10 @@ class _generalExclusionsDeductiblesState
context.pop();
},
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
if (!Responsive.isDesktop(context))
// if (!Responsive.isDesktop(context))
Icon(
Icons.chevron_left,
color: Color(0xFF000000),
@ -258,8 +256,9 @@ class _generalExclusionsDeductiblesState
Text(
type3SectionName ?? '',
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context) ? 18 : 16,
fontSize: Responsive.isDesktop(context)
? 18
: 16,
fontWeight: FontWeight.w500,
color: Color(0xFF000000),
),
@ -269,9 +268,11 @@ class _generalExclusionsDeductiblesState
),
if (generalExclusionsDetails != null)
Padding(
padding: EdgeInsets.only(bottom: 20, left: 15),
padding:
EdgeInsets.only(bottom: 20, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
SizedBox(height: 10),
LayoutBuilder(
@ -280,7 +281,8 @@ class _generalExclusionsDeductiblesState
50; // Adjust item height based on content
double listViewHeight =
type3Content.length * itemHeight;
double maxHeight = constraints.maxHeight;
double maxHeight =
constraints.maxHeight;
if (listViewHeight > maxHeight) {
listViewHeight = maxHeight;
@ -293,41 +295,43 @@ class _generalExclusionsDeductiblesState
itemBuilder: (context, index) {
String key = type3Content.keys
.elementAt(index);
String value = type3Content[key]!;
String value =
type3Content[key]!;
return Padding(
padding:
const EdgeInsets.symmetric(
vertical: 8.0),
padding: const EdgeInsets
.symmetric(vertical: 8.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: <Widget>[
Padding(
padding:
const EdgeInsets.only(
const EdgeInsets
.only(
left: 20.0),
child: Text(
"",
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFFE26728),
color: Color(
0xFFE26728),
),
),
),
Expanded(
child: Text(
value,
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFF000000),
color: Color(
0xFF000000),
),
),
),
@ -362,8 +366,9 @@ class _generalExclusionsDeductiblesState
Text(
type4SectionName ?? '',
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context) ? 18 : 16,
fontSize: Responsive.isDesktop(context)
? 18
: 16,
fontWeight: FontWeight.w500,
color: Color(0xFF000000),
),
@ -373,14 +378,17 @@ class _generalExclusionsDeductiblesState
),
if (generalExclusionsDetails != null)
Padding(
padding: EdgeInsets.only(bottom: 20, left: 15),
padding:
EdgeInsets.only(bottom: 20, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
type4Heading ?? '',
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 18
: 16,
fontWeight: FontWeight.w500,
@ -394,7 +402,8 @@ class _generalExclusionsDeductiblesState
40; // Adjust item height based on content
double listViewHeight =
type4Content.length * itemHeight;
double maxHeight = constraints.maxHeight;
double maxHeight =
constraints.maxHeight;
if (listViewHeight > maxHeight) {
listViewHeight = maxHeight;
@ -407,41 +416,43 @@ class _generalExclusionsDeductiblesState
itemBuilder: (context, index) {
String key = type4Content.keys
.elementAt(index);
String value = type4Content[key]!;
String value =
type4Content[key]!;
return Padding(
padding:
const EdgeInsets.symmetric(
vertical: 8.0),
padding: const EdgeInsets
.symmetric(vertical: 8.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: <Widget>[
Padding(
padding:
const EdgeInsets.only(
const EdgeInsets
.only(
left: 20.0),
child: Text(
"",
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFFE26728),
color: Color(
0xFFE26728),
),
),
),
Expanded(
child: Text(
value,
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFF000000),
color: Color(
0xFF000000),
),
),
),
@ -470,14 +481,17 @@ class _generalExclusionsDeductiblesState
children: [
if (generalExclusionsDetails != null)
Padding(
padding: EdgeInsets.only(bottom: 20, left: 15),
padding:
EdgeInsets.only(bottom: 20, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
type5Heading ?? '',
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 18
: 16,
fontWeight: FontWeight.w500,
@ -491,7 +505,8 @@ class _generalExclusionsDeductiblesState
40; // Adjust item height based on content
double listViewHeight =
type5Content.length * itemHeight;
double maxHeight = constraints.maxHeight;
double maxHeight =
constraints.maxHeight;
if (listViewHeight > maxHeight) {
listViewHeight = maxHeight;
@ -504,41 +519,43 @@ class _generalExclusionsDeductiblesState
itemBuilder: (context, index) {
String key = type5Content.keys
.elementAt(index);
String value = type5Content[key]!;
String value =
type5Content[key]!;
return Padding(
padding:
const EdgeInsets.symmetric(
vertical: 8.0),
padding: const EdgeInsets
.symmetric(vertical: 8.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: <Widget>[
Padding(
padding:
const EdgeInsets.only(
const EdgeInsets
.only(
left: 20.0),
child: Text(
"",
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFFE26728),
color: Color(
0xFFE26728),
),
),
),
Expanded(
child: Text(
value,
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFF000000),
color: Color(
0xFF000000),
),
),
),
@ -567,14 +584,17 @@ class _generalExclusionsDeductiblesState
children: [
if (generalExclusionsDetails != null)
Padding(
padding: EdgeInsets.only(bottom: 20, left: 15),
padding:
EdgeInsets.only(bottom: 20, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
type6Heading ?? '',
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 18
: 16,
fontWeight: FontWeight.w500,
@ -588,7 +608,8 @@ class _generalExclusionsDeductiblesState
40; // Adjust item height based on content
double listViewHeight =
type6Content.length * itemHeight;
double maxHeight = constraints.maxHeight;
double maxHeight =
constraints.maxHeight;
if (listViewHeight > maxHeight) {
listViewHeight = maxHeight;
@ -601,41 +622,43 @@ class _generalExclusionsDeductiblesState
itemBuilder: (context, index) {
String key = type6Content.keys
.elementAt(index);
String value = type6Content[key]!;
String value =
type6Content[key]!;
return Padding(
padding:
const EdgeInsets.symmetric(
vertical: 8.0),
padding: const EdgeInsets
.symmetric(vertical: 8.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: <Widget>[
Padding(
padding:
const EdgeInsets.only(
const EdgeInsets
.only(
left: 20.0),
child: Text(
"",
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFFE26728),
color: Color(
0xFFE26728),
),
),
),
Expanded(
child: Text(
value,
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFF000000),
color: Color(
0xFF000000),
),
),
),
@ -664,14 +687,17 @@ class _generalExclusionsDeductiblesState
children: [
if (generalExclusionsDetails != null)
Padding(
padding: EdgeInsets.only(bottom: 20, left: 15),
padding:
EdgeInsets.only(bottom: 20, left: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
type7Heading ?? '',
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 18
: 16,
fontWeight: FontWeight.w500,
@ -685,7 +711,8 @@ class _generalExclusionsDeductiblesState
40; // Adjust item height based on content
double listViewHeight =
type7Content.length * itemHeight;
double maxHeight = constraints.maxHeight;
double maxHeight =
constraints.maxHeight;
if (listViewHeight > maxHeight) {
listViewHeight = maxHeight;
@ -698,41 +725,43 @@ class _generalExclusionsDeductiblesState
itemBuilder: (context, index) {
String key = type7Content.keys
.elementAt(index);
String value = type7Content[key]!;
String value =
type7Content[key]!;
return Padding(
padding:
const EdgeInsets.symmetric(
vertical: 8.0),
padding: const EdgeInsets
.symmetric(vertical: 8.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
CrossAxisAlignment
.start,
children: <Widget>[
Padding(
padding:
const EdgeInsets.only(
const EdgeInsets
.only(
left: 20.0),
child: Text(
"",
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFFE26728),
color: Color(
0xFFE26728),
),
),
),
Expanded(
child: Text(
value,
style:
GoogleFonts.poppins(
style: GoogleFonts
.poppins(
fontSize: 16,
fontWeight:
FontWeight.w400,
color:
Color(0xFF000000),
color: Color(
0xFF000000),
),
),
),
@ -811,7 +840,6 @@ class _generalExclusionsDeductiblesState
"Wellness",
],
),
)
);
));
}
}

View File

@ -326,7 +326,8 @@ class _helpState extends State<help> {
child: Column(children: [
Container(
padding: Responsive.isDesktop(context)
? EdgeInsets.only(top: 15, bottom: 15, left: 25, right: 25)
? EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25)
: EdgeInsets.only(top: 0, bottom: 0, left: 0, right: 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
@ -338,7 +339,7 @@ class _helpState extends State<help> {
flex: 12,
child: InkWell(
onTap: () {
context.pop();
context.push('/claims');
// Navigator.pushNamed(context, 'home');
},
child: Row(
@ -365,7 +366,8 @@ class _helpState extends State<help> {
alignment: Alignment.center,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
SvgPicture.string(
SvgService.getSvg('help'),
@ -384,11 +386,14 @@ class _helpState extends State<help> {
if (accountManagerDetails != null)
Container(
decoration: BoxDecoration(
color: Colors.white, // Set background color for the container
color: Colors
.white, // Set background color for the container
),
padding: Responsive.isDesktop(context)
? EdgeInsets.only(top: 10, bottom: 10, left: 10, right: 10)
: EdgeInsets.only(top: 5, bottom: 5, left: 10, right: 10),
? EdgeInsets.only(
top: 10, bottom: 10, left: 10, right: 10)
: EdgeInsets.only(
top: 5, bottom: 5, left: 10, right: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@ -418,7 +423,8 @@ class _helpState extends State<help> {
Row(
mainAxisAlignment: MainAxisAlignment
.center, // Center align the row
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
GestureDetector(
onTap: () {
@ -431,7 +437,8 @@ class _helpState extends State<help> {
),
),
SizedBox(
width: 10), // Space between icon and text
width:
10), // Space between icon and text
GestureDetector(
onTap: () {
_openEmail(accountManagerEmail);
@ -439,7 +446,8 @@ class _helpState extends State<help> {
child: Text(
accountManagerEmail ?? '',
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 16
: 14,
fontWeight: FontWeight.w400,
@ -453,7 +461,8 @@ class _helpState extends State<help> {
Row(
mainAxisAlignment: MainAxisAlignment
.center, // Center align the row
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
GestureDetector(
onTap: () {
@ -466,7 +475,8 @@ class _helpState extends State<help> {
),
),
SizedBox(
width: 10), // Space between icon and text
width:
10), // Space between icon and text
GestureDetector(
onTap: () {
_openDialPad(accountManagerMobileNo);
@ -474,7 +484,8 @@ class _helpState extends State<help> {
child: Text(
accountManagerMobileNo ?? '',
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 16
: 14,
fontWeight: FontWeight.w400,
@ -498,7 +509,8 @@ class _helpState extends State<help> {
// ? EdgeInsets.only(top: 20, bottom: 20, left: 30, right: 30)
// : EdgeInsets.only(top: 5, bottom: 5,left: 10,right: 10),
padding: Responsive.isDesktop(context)
? EdgeInsets.only(top: 20, bottom: 20, left: 30, right: 30)
? EdgeInsets.only(
top: 20, bottom: 20, left: 30, right: 30)
: EdgeInsets.symmetric(vertical: 5, horizontal: 10),
child: Row(
children: [
@ -893,8 +905,6 @@ class _helpState extends State<help> {
// ),
// // SizedBox(height: Responsive.isDesktop(context) ? 40 : 70),
// if (ticketsActive == 0)
// if (ticketList == null || ticketList.isEmpty)
// Card(
@ -1067,8 +1077,7 @@ class _helpState extends State<help> {
],
initialIndex: 3, // Initial index of the bottom navigation bar
),
)
);
));
}
List<Widget> generateClaimsList(List<dynamic> data) {
@ -1561,7 +1570,6 @@ class _helpState extends State<help> {
context.go('/tickettracklist', extra: item['thz_id']);
// Navigator.pushNamed(
// context,
// 'claimtracklist',

View File

@ -1,7 +1,8 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'dart:math';
import 'dart:html' as html;
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@ -45,6 +46,7 @@ class Home extends StatefulWidget {
class _HomeState extends State<Home> {
bool _dialogShown = false;
late StreamSubscription<html.PopStateEvent> _popStateListener;
bool isLoadingGif = false;
late ApiService apiService;
int _currentIndex = 0;
@ -60,7 +62,7 @@ class _HomeState extends State<Home> {
dynamic policyHeading;
dynamic policyName;
dynamic EmployeePolicy;
dynamic emp_name;
dynamic emp_name = '';
dynamic pre_policy_count;
dynamic client_branch_id;
dynamic mobileNo;
@ -118,11 +120,6 @@ class _HomeState extends State<Home> {
);
print('loadSelfEmployeeProfile');
// if (kIsWeb) {
// openBotmanChat();
// }
@ -189,6 +186,9 @@ class _HomeState extends State<Home> {
final preToken = TokenService.getPreToken();
print('preToken');
print(preToken);
WidgetsBinding.instance.addPostFrameCallback((_) {
checkbackbutton();
});
setState(() {
isTokenAvailable = preToken != null;
});
@ -411,9 +411,22 @@ class _HomeState extends State<Home> {
);
}
void checkbackbutton() async {
// Push a dummy state so back button triggers popstate instead of navigating
html.window.history.pushState(null, 'home', html.window.location.href);
_popStateListener = html.window.onPopState.listen((event) {
if (!_dialogShown && mounted) {
_showBackConfirmationDialog();
}
// Re-push to prevent leaving
html.window.history.pushState(null, 'home', html.window.location.href);
});
}
@override
Widget build(BuildContext context) {
if (!Responsive.isDesktop(context))
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Color(0xFFFFFBDE), // Status bar color
@ -421,10 +434,14 @@ class _HomeState extends State<Home> {
));
return PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, result) {
onPopInvoked: (didPop) {
if (didPop) return;
_showExitConfirmation(context);
},
// onPopInvokedWithResult: (didPop, result) {
// if (didPop) return;
// _showExitConfirmation(context);
// },
child: Scaffold(
backgroundColor: Colors.white,
appBar: CustomAppBar(),
@ -459,7 +476,8 @@ class _HomeState extends State<Home> {
'Hello, $emp_name!',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 20
: 20,
fontWeight: FontWeight.w500,
@ -520,8 +538,9 @@ class _HomeState extends State<Home> {
'Policies for enrollment : $pre_policy_count',
textAlign: TextAlign.center,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(context) ? 18 : 12,
fontSize: Responsive.isDesktop(context)
? 18
: 12,
fontWeight: FontWeight.w500,
color: Color(0xFF404040),
),
@ -667,7 +686,8 @@ class _HomeState extends State<Home> {
'Your Policies',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
fontSize: Responsive.isDesktop(context)
fontSize:
Responsive.isDesktop(context)
? 18
: 18,
fontWeight: FontWeight.w500,
@ -694,14 +714,16 @@ class _HomeState extends State<Home> {
SizedBox(height: 15),
Container(
decoration: BoxDecoration(
color:
Color(0xFFEEF5FF), // Set background color for the container
color: Color(
0xFFEEF5FF), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: Responsive.isDesktop(context)
? EdgeInsets.only(top: 10, bottom: 10, left: 25, right: 25)
: EdgeInsets.only(top: 10, bottom: 10, left: 10, right: 10),
? EdgeInsets.only(
top: 10, bottom: 10, left: 25, right: 25)
: EdgeInsets.only(
top: 10, bottom: 10, left: 10, right: 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@ -733,17 +755,19 @@ class _HomeState extends State<Home> {
? Material(
elevation: 5,
borderRadius:
BorderRadius.circular(10),
BorderRadius.circular(
10),
color: Colors.white,
child: SizedBox(
width: Responsive.isDesktop(
width: Responsive
.isDesktop(
context)
? 400
: 150, // Set the width here
child: TextButton(
onPressed: () {},
style:
TextButton.styleFrom(
style: TextButton
.styleFrom(
padding: EdgeInsets
.symmetric(
vertical: Responsive
@ -754,6 +778,25 @@ class _HomeState extends State<Home> {
),
),
child: Text(
'Active',
style: GoogleFonts
.poppins(
fontSize: Responsive
.isDesktop(
context)
? 18
: 13,
fontWeight:
FontWeight
.w500,
color: Color(
0xFF593AFF),
),
),
),
),
)
: Text(
'Active',
style:
GoogleFonts.poppins(
@ -763,24 +806,9 @@ class _HomeState extends State<Home> {
? 18
: 13,
fontWeight:
FontWeight.w500,
FontWeight.w400,
color:
Color(0xFF593AFF),
),
),
),
),
)
: Text(
'Active',
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(
context)
? 18
: 13,
fontWeight: FontWeight.w400,
color: Color(0xFF636363),
Color(0xFF636363),
),
),
),
@ -802,17 +830,19 @@ class _HomeState extends State<Home> {
? Material(
elevation: 5,
borderRadius:
BorderRadius.circular(10),
BorderRadius.circular(
10),
color: Colors.white,
child: SizedBox(
width: Responsive.isDesktop(
width: Responsive
.isDesktop(
context)
? 400
: 150, // Set the width here
child: TextButton(
onPressed: () {},
style:
TextButton.styleFrom(
style: TextButton
.styleFrom(
padding: EdgeInsets
.symmetric(
vertical: Responsive
@ -823,6 +853,25 @@ class _HomeState extends State<Home> {
),
),
child: Text(
'Inactive',
style: GoogleFonts
.poppins(
fontSize: Responsive
.isDesktop(
context)
? 18
: 13,
fontWeight:
FontWeight
.w500,
color: Color(
0xFF593AFF),
),
),
),
),
)
: Text(
'Inactive',
style:
GoogleFonts.poppins(
@ -832,24 +881,9 @@ class _HomeState extends State<Home> {
? 18
: 13,
fontWeight:
FontWeight.w500,
FontWeight.w400,
color:
Color(0xFF593AFF),
),
),
),
),
)
: Text(
'Inactive',
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(
context)
? 18
: 13,
fontWeight: FontWeight.w400,
color: Color(0xFF636363),
Color(0xFF636363),
),
),
),
@ -1222,28 +1256,67 @@ class _HomeState extends State<Home> {
SizedBox(height: 7),
Row(
children: [
Expanded(
flex: 12,
Flexible(
child: Container(
// color: Colors.red,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
Tooltip(
message: '$memberNames',
child: Text(
memberNames ?? '',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(
maxLines: 1,
overflow:
TextOverflow.ellipsis,
softWrap: false,
style:
GoogleFonts.poppins(
fontSize: Responsive
.isDesktop(
context)
? 14
: 13,
fontWeight: FontWeight.w400,
color: Color(0xFF000000),
fontWeight:
FontWeight.w400,
color: const Color(
0xFF000000),
),
),
),
],
),
),
),
// Expanded(
// flex: 1,
// child: Container(
// color: Colors.red,
// child: Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Text(
// memberNames ?? '',
// textAlign: TextAlign.left,
// style: GoogleFonts.poppins(
// fontSize:
// Responsive.isDesktop(
// context)
// ? 14
// : 13,
// fontWeight:
// FontWeight.w400,
// color: Color(0xFF000000),
// ),
// ),
// ],
// ),
// ),
// ),
],
),
SizedBox(height: 7),

View File

@ -779,44 +779,17 @@ class _profileState extends State<profile> {
),
SizedBox(height: 10),
Container(
// color: Colors.amberAccent,
width: MediaQuery.of(context).size.width,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
flex: 12,
child: Container(
width: 150,
// height: Responsive.isDesktop(context) ? 150 : 100,
alignment: Alignment.center,
child: ElevatedButton(
onPressed: () {
logout(context);
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.logout,
color: Color(0xFFE26728),
),
SizedBox(
width:
8), // Adjust space between icon and text
Text(
'Logout',
style: GoogleFonts.poppins(
color: Color(0xFFE26728)),
),
],
),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
side: BorderSide(color: Color(0xFFE26728)),
),
),
),
)),
Responsive.isDesktop(context)
? _buildLogoutButton(context)
: Expanded(
flex: 12, child: _buildLogoutButton(context)),
],
),
),
@ -935,4 +908,31 @@ class _profileState extends State<profile> {
),
));
}
Widget _buildLogoutButton(BuildContext context) {
return Container(
alignment: Alignment.center,
child: ElevatedButton(
onPressed: () => logout(context),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
side: const BorderSide(color: Color(0xFFE26728)),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(Icons.logout, color: Color(0xFFE26728)),
const SizedBox(width: 8),
Text(
'Logout',
style: GoogleFonts.poppins(color: const Color(0xFFE26728)),
),
],
),
),
);
}
}

View File

@ -109,7 +109,6 @@ class _ticketsState extends State<tickets> {
}
}
Future<void> getActiveAndInactivePolicyDetails() async {
if (client_id == null || empCodeString == null) {
return;
@ -213,8 +212,7 @@ class _ticketsState extends State<tickets> {
print('Check One');
Map<String, dynamic> formData = {
'email': decodedToken?['email_corporate'],
'empcode':
decodedToken?['emp_code'],
'empcode': decodedToken?['emp_code'],
'message': messageController.text,
'mobile': decodedToken?['mobile'],
'name': decodedToken?['name'],
@ -296,7 +294,8 @@ class _ticketsState extends State<tickets> {
15.0), // Set border radius for Container
),
padding: Responsive.isDesktop(context)
? EdgeInsets.only(top: 15, bottom: 15, left: 15, right: 15)
? EdgeInsets.only(
top: 15, bottom: 15, left: 15, right: 15)
: EdgeInsets.only(
top: 10,
bottom: 10,
@ -332,14 +331,14 @@ class _ticketsState extends State<tickets> {
right: 10),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
// flex: 1,
child: InkWell(
onTap: () {
context.go('/help');
@ -355,22 +354,26 @@ class _ticketsState extends State<tickets> {
Expanded(
flex: 11,
child: Row(
mainAxisAlignment:
Responsive.isDesktop(context)
? MainAxisAlignment.center
mainAxisAlignment: Responsive
.isDesktop(context)
? MainAxisAlignment.start
: MainAxisAlignment.start,
children: [
Text(
'Raise a Query',
textAlign: TextAlign.start,
style: GoogleFonts.poppins(
fontSize:
Responsive.isDesktop(
textAlign:
TextAlign.start,
style:
GoogleFonts.poppins(
fontSize: Responsive
.isDesktop(
context)
? 20
: 16,
fontWeight: FontWeight.w600,
color: Color(0xFF000000),
fontWeight:
FontWeight.w600,
color:
Color(0xFF000000),
),
)
],
@ -422,9 +425,11 @@ class _ticketsState extends State<tickets> {
serList[
'id'] ==
value,
orElse: () =>
orElse:
() =>
{
'name': ''
'name':
''
},
)['name'];
isServiceValid =
@ -457,7 +462,8 @@ class _ticketsState extends State<tickets> {
String>(
'Policy Number',
(value) {
setState(() {
setState(
() {
policyNumberId =
value;
isPolicyValid =
@ -475,8 +481,8 @@ class _ticketsState extends State<tickets> {
Text(
'Please select a policy',
style: TextStyle(
color: Colors
.red)),
color:
Colors.red)),
],
),
SizedBox(height: 15),
@ -492,8 +498,8 @@ class _ticketsState extends State<tickets> {
Text(
'Please enter the Subject',
style: TextStyle(
color: Colors
.red)),
color:
Colors.red)),
SizedBox(
height: 15),
buildTextAreaField(
@ -503,8 +509,8 @@ class _ticketsState extends State<tickets> {
Text(
'Please enter the Message',
style: TextStyle(
color: Colors
.red)),
color:
Colors.red)),
]),
],
),
@ -520,23 +526,28 @@ class _ticketsState extends State<tickets> {
Expanded(
flex: 12,
child: Container(
alignment: Alignment.centerRight,
alignment:
Alignment.centerRight,
child: ElevatedButton(
onPressed: () {
sendFormDataToApi();
},
child: Text(
'Send',
style: GoogleFonts.poppins(
color: Colors.white),
style:
GoogleFonts.poppins(
color:
Colors.white),
),
style: ElevatedButton.styleFrom(
style: ElevatedButton
.styleFrom(
backgroundColor:
Color(0xFFE26728),
shape: RoundedRectangleBorder(
shape:
RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(
5),
BorderRadius
.circular(5),
),
),
),
@ -625,8 +636,7 @@ class _ticketsState extends State<tickets> {
],
initialIndex: 3, // Initial index of the bottom navigation bar
),
)
);
));
}
Widget buildTextField(String label, TextEditingController controller,