CHANGE_ : Chatbot and bug fix
This commit is contained in:
parent
a5d53b6803
commit
82b039deab
2
.env
2
.env
@ -1,4 +1,4 @@
|
||||
API_URL=https://dev.venbait.in/nhance/uat/employeeRest/
|
||||
TICKET_API_URL=https://dev.venbait.in/nhance/helpdesk/uat/api
|
||||
BASE_HREF=/nhance/employee/uat/
|
||||
ENV=production
|
||||
ENV=uat
|
||||
@ -28,6 +28,10 @@
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="https" />
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
|
||||
@ -42,6 +42,10 @@
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>https</string>
|
||||
</array>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
|
||||
87
lib/customAppBar/customAppBarChatbot.dart
Normal file
87
lib/customAppBar/customAppBarChatbot.dart
Normal file
@ -0,0 +1,87 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:adaptive_navbar/adaptive_navbar.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:nhance_app_pwa/customAppBar/responsive.dart';
|
||||
|
||||
class CustomAppBarChatbot extends StatelessWidget
|
||||
implements PreferredSizeWidget {
|
||||
@override
|
||||
Size get preferredSize => Size.fromHeight(kToolbarHeight);
|
||||
|
||||
Future<void> logout(BuildContext context) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final String? token = prefs.getString('token');
|
||||
|
||||
if (token != null && token.isNotEmpty) {
|
||||
await prefs.clear();
|
||||
Navigator.pushNamed(context, 'phone');
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final sw = MediaQuery.of(context).size.width;
|
||||
final isPoliciesPage = Uri.base.fragment == 'policies';
|
||||
return ClipRRect(
|
||||
borderRadius: Responsive.isDesktop(context) || isPoliciesPage
|
||||
? BorderRadius.zero
|
||||
: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(32.0),
|
||||
bottomRight: Radius.circular(32.0),
|
||||
),
|
||||
child: AppBar(
|
||||
backgroundColor: const Color(0xFFFFFBDE),
|
||||
elevation: 0, // Set background color for AppBar
|
||||
toolbarHeight: kToolbarHeight,
|
||||
titleSpacing: 0.0,
|
||||
automaticallyImplyLeading: false,
|
||||
title: Padding(
|
||||
padding: Responsive.isDesktop(context)
|
||||
? EdgeInsets.symmetric(horizontal: 16.0)
|
||||
: EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Row(
|
||||
children: [
|
||||
// Logo Column
|
||||
Expanded(
|
||||
flex: Responsive.isDesktop(context) ? 3 : 9,
|
||||
child: Row(
|
||||
mainAxisAlignment: Responsive.isDesktop(context)
|
||||
? MainAxisAlignment.spaceEvenly
|
||||
: MainAxisAlignment
|
||||
.start, // Adjust the alignment as needed
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: 10, bottom: 10, left: 10, right: 10),
|
||||
width: Responsive.isDesktop(context) ? 230 : 170,
|
||||
height: Responsive.isDesktop(context) ? 230 : 170,
|
||||
child: Image.asset(
|
||||
'assets/nhance_client_logo.png',
|
||||
fit: BoxFit.contain, // Adjust the fit as needed
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
// AdaptiveNavBar Column
|
||||
|
||||
Expanded(
|
||||
flex: Responsive.isDesktop(context) ? 9 : 3,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Icon(
|
||||
Icons.close_outlined, // Replace with your desired icon
|
||||
size: 24.0, // Adjust the icon size
|
||||
color: Colors.black, // Adjust the icon color
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -18,6 +18,7 @@ import 'package:nhance_app_pwa/pages/postEnrollment/policies.dart';
|
||||
import 'package:nhance_app_pwa/pages/postEnrollment/privacypolicy.dart';
|
||||
import 'package:nhance_app_pwa/pages/postEnrollment/profile.dart';
|
||||
import 'package:nhance_app_pwa/pages/postEnrollment/termsofuse.dart';
|
||||
import 'package:nhance_app_pwa/pages/postEnrollment/wellness.dart';
|
||||
import 'package:nhance_app_pwa/pages/session/SetPinBiometric.dart';
|
||||
import 'package:nhance_app_pwa/pages/session/authenticationService.dart';
|
||||
import 'package:nhance_app_pwa/pages/session/changePin.dart';
|
||||
@ -71,6 +72,7 @@ Future<void> main() async {
|
||||
'help': (context) => help(),
|
||||
'claimprocess': (context) => claimprocess(),
|
||||
'profile': (context) => profile(),
|
||||
'wellness': (context) => wellness(),
|
||||
'planclaimsform': (context) => planclaimsform(),
|
||||
'claimtracklist': (context) => claimtracklist(),
|
||||
'privacypolicy': (context) => privacypolicy(),
|
||||
|
||||
@ -3883,6 +3883,8 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
||||
Navigator.pushNamed(context, 'profile');
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
@ -3890,12 +3892,14 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
"wellness",
|
||||
],
|
||||
initialIndex:
|
||||
0, // Initial index of the bottom navigation bar
|
||||
@ -3905,6 +3909,18 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _launchURL(String url) async {
|
||||
final Uri uri = Uri.parse(url); // Parse the URL properly
|
||||
print('_launchURL $uri');
|
||||
if (uri != null) {
|
||||
print('If $uri');
|
||||
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} else {
|
||||
print('else $uri');
|
||||
throw 'Could not launch $url';
|
||||
}
|
||||
}
|
||||
|
||||
void openForm(Map<String, dynamic> floaterData, action) {
|
||||
print(action);
|
||||
print(floaterData);
|
||||
@ -4301,21 +4317,11 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
if (gmcECardDownload != null)
|
||||
if (item['eCardDownload'] != null)
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
// Convert the URL string to a Uri object
|
||||
Uri uri =
|
||||
Uri.parse(gmcECardDownload);
|
||||
// Check if the URL is valid
|
||||
if (await canLaunchUrl(uri)) {
|
||||
// Open the URL in the default browser
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
// Handle the case where the URL cannot be launched
|
||||
print(
|
||||
'Could not launch $gmcECardDownload');
|
||||
}
|
||||
_launchURL(
|
||||
item['eCardDownload']);
|
||||
},
|
||||
child: MouseRegion(
|
||||
cursor:
|
||||
@ -4535,16 +4541,10 @@ class _addOnsDetailsState extends State<addOnsDetails> {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
if (gpaECardDownload != null)
|
||||
if (item['eCardDownload'] != null)
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
Uri uri = Uri.parse(gpaECardDownload);
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
print(
|
||||
'Could not launch $gpaECardDownload');
|
||||
}
|
||||
_launchURL(item['eCardDownload']);
|
||||
},
|
||||
child: MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
|
||||
@ -829,6 +829,8 @@ class _empDetailsState extends State<empDetails> {
|
||||
Navigator.pushNamed(context, 'profile');
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
@ -836,12 +838,14 @@ class _empDetailsState extends State<empDetails> {
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
"Wellness",
|
||||
],
|
||||
initialIndex:
|
||||
0, // Initial index of the bottom navigation bar
|
||||
@ -851,6 +855,19 @@ class _empDetailsState extends State<empDetails> {
|
||||
}
|
||||
}
|
||||
|
||||
// Function to open URL in the default browser
|
||||
Future<void> _launchURL(String url) async {
|
||||
final Uri uri = Uri.parse(url); // Parse the URL properly
|
||||
print('_launchURL $uri');
|
||||
if (uri != null) {
|
||||
print('If $uri');
|
||||
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} else {
|
||||
print('else $uri');
|
||||
throw 'Could not launch $url';
|
||||
}
|
||||
}
|
||||
|
||||
void openForm(Map<String, dynamic> floaterData, action) {
|
||||
print(action);
|
||||
print(floaterData);
|
||||
@ -1706,13 +1723,7 @@ class _empDetailsState extends State<empDetails> {
|
||||
if (gpaECardDownload != null)
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
Uri uri = Uri.parse(gpaECardDownload);
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
print(
|
||||
'Could not launch $gpaECardDownload');
|
||||
}
|
||||
_launchURL(item['eCardDownload']);
|
||||
},
|
||||
child: MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
@ -2101,22 +2112,10 @@ class _empDetailsState extends State<empDetails> {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
if (gmcECardDownload != null)
|
||||
if (item['eCardDownload'] != null)
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
// Convert the URL string to a Uri object
|
||||
Uri uri =
|
||||
Uri.parse(gmcECardDownload);
|
||||
|
||||
// Check if the URL is valid
|
||||
if (await canLaunchUrl(uri)) {
|
||||
// Open the URL in the default browser
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
// Handle the case where the URL cannot be launched
|
||||
print(
|
||||
'Could not launch $gmcECardDownload');
|
||||
}
|
||||
_launchURL(item['eCardDownload']);
|
||||
},
|
||||
child: MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
|
||||
@ -727,6 +727,19 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
||||
);
|
||||
}
|
||||
|
||||
// Function to open URL in the default browser
|
||||
Future<void> _launchURL(String url) async {
|
||||
final Uri uri = Uri.parse(url); // Parse the URL properly
|
||||
print('_launchURL $uri');
|
||||
if (uri != null) {
|
||||
print('If $uri');
|
||||
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} else {
|
||||
print('else $uri');
|
||||
throw 'Could not launch $url';
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if ((gpaMappedFamilyFloaters == [] && gpaMappedFamilyFloaters == null) &&
|
||||
@ -1051,21 +1064,8 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
||||
null)
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
// Convert the URL string to a Uri object
|
||||
Uri uri = Uri.parse(
|
||||
_launchURL(
|
||||
topUpECardDownload);
|
||||
|
||||
// Check if the URL is valid
|
||||
if (await canLaunchUrl(
|
||||
uri)) {
|
||||
// Open the URL in the default browser
|
||||
await launchUrl(
|
||||
uri);
|
||||
} else {
|
||||
// Handle the case where the URL cannot be launched
|
||||
print(
|
||||
'Could not launch $topUpECardDownload');
|
||||
}
|
||||
},
|
||||
child: MouseRegion(
|
||||
cursor:
|
||||
@ -1283,21 +1283,8 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
||||
null)
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
// Convert the URL string to a Uri object
|
||||
Uri uri = Uri.parse(
|
||||
_launchURL(
|
||||
topUpParentECardDownload);
|
||||
|
||||
// Check if the URL is valid
|
||||
if (await canLaunchUrl(
|
||||
uri)) {
|
||||
// Open the URL in the default browser
|
||||
await launchUrl(
|
||||
uri);
|
||||
} else {
|
||||
// Handle the case where the URL cannot be launched
|
||||
print(
|
||||
'Could not launch $topUpParentECardDownload');
|
||||
}
|
||||
},
|
||||
child: MouseRegion(
|
||||
cursor:
|
||||
@ -1512,21 +1499,8 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
||||
null)
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
// Convert the URL string to a Uri object
|
||||
Uri uri = Uri.parse(
|
||||
_launchURL(
|
||||
addOnsDependentECardDownload);
|
||||
|
||||
// Check if the URL is valid
|
||||
if (await canLaunchUrl(
|
||||
uri)) {
|
||||
// Open the URL in the default browser
|
||||
await launchUrl(
|
||||
uri);
|
||||
} else {
|
||||
// Handle the case where the URL cannot be launched
|
||||
print(
|
||||
'Could not launch $addOnsDependentECardDownload');
|
||||
}
|
||||
},
|
||||
child: MouseRegion(
|
||||
cursor:
|
||||
@ -2278,6 +2252,8 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
||||
Navigator.pushNamed(context, 'profile');
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
@ -2285,12 +2261,14 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
"wellness",
|
||||
],
|
||||
initialIndex:
|
||||
0, // Initial index of the bottom navigation bar
|
||||
@ -2420,16 +2398,10 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
if (gpaECardDownload != null)
|
||||
if (item['eCardDownload'] != null)
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
Uri uri = Uri.parse(gpaECardDownload);
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
print(
|
||||
'Could not launch $gpaECardDownload');
|
||||
}
|
||||
_launchURL(item['eCardDownload']);
|
||||
},
|
||||
child: MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
@ -2584,22 +2556,11 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
if (gmcECardDownload != null)
|
||||
if (item['eCardDownload'] != null)
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
// Convert the URL string to a Uri object
|
||||
Uri uri =
|
||||
Uri.parse(gmcECardDownload);
|
||||
|
||||
// Check if the URL is valid
|
||||
if (await canLaunchUrl(uri)) {
|
||||
// Open the URL in the default browser
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
// Handle the case where the URL cannot be launched
|
||||
print(
|
||||
'Could not launch $gmcECardDownload');
|
||||
}
|
||||
_launchURL(
|
||||
item['eCardDownload']);
|
||||
},
|
||||
child: MouseRegion(
|
||||
cursor:
|
||||
|
||||
@ -256,7 +256,13 @@ class _loginState extends State<login> {
|
||||
top: 0, // Example value for mobile
|
||||
);
|
||||
}
|
||||
return Scaffold(
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
// Close the app on mobile back button press
|
||||
exit(0); // This will exit the app
|
||||
return false; // Return false to prevent any other actions
|
||||
},
|
||||
child: Scaffold(
|
||||
body: SingleChildScrollView(
|
||||
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
|
||||
child: Container(
|
||||
@ -287,9 +293,12 @@ class _loginState extends State<login> {
|
||||
.center, // Align to the center
|
||||
children: [
|
||||
Expanded(
|
||||
flex: Responsive.isDesktop(context) ? 10 : 12,
|
||||
flex: Responsive.isDesktop(context)
|
||||
? 10
|
||||
: 12,
|
||||
child: Align(
|
||||
alignment: Responsive.isDesktop(context)
|
||||
alignment:
|
||||
Responsive.isDesktop(context)
|
||||
? Alignment.centerLeft
|
||||
: Alignment.bottomCenter,
|
||||
child: Image.asset(
|
||||
@ -361,7 +370,8 @@ class _loginState extends State<login> {
|
||||
? EdgeInsets.only(left: 20, right: 20)
|
||||
: EdgeInsets.only(left: 0, right: 0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
if (!Responsive.isMobile(context) &&
|
||||
!Responsive.isTablet(context))
|
||||
@ -370,8 +380,8 @@ class _loginState extends State<login> {
|
||||
Expanded(
|
||||
flex: 12,
|
||||
child: Align(
|
||||
alignment: Responsive.isDesktop(
|
||||
context)
|
||||
alignment: Responsive
|
||||
.isDesktop(context)
|
||||
? Alignment.centerLeft
|
||||
: Alignment
|
||||
.bottomCenter, // Align to the start
|
||||
@ -400,7 +410,8 @@ class _loginState extends State<login> {
|
||||
margin: Responsive.isDesktop(context)
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: 150)
|
||||
: EdgeInsets.symmetric(horizontal: 0),
|
||||
: EdgeInsets.symmetric(
|
||||
horizontal: 0),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
@ -422,7 +433,8 @@ class _loginState extends State<login> {
|
||||
margin: Responsive.isDesktop(context)
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: 150)
|
||||
: EdgeInsets.symmetric(horizontal: 0),
|
||||
: EdgeInsets.symmetric(
|
||||
horizontal: 0),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
@ -447,11 +459,13 @@ class _loginState extends State<login> {
|
||||
margin: Responsive.isDesktop(context)
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: 150)
|
||||
: EdgeInsets.symmetric(horizontal: 0),
|
||||
: EdgeInsets.symmetric(
|
||||
horizontal: 0),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1, color: Colors.grey),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
borderRadius:
|
||||
BorderRadius.circular(10),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
@ -483,7 +497,8 @@ class _loginState extends State<login> {
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: mobileController,
|
||||
keyboardType: TextInputType.phone,
|
||||
keyboardType:
|
||||
TextInputType.phone,
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText:
|
||||
@ -517,13 +532,15 @@ class _loginState extends State<login> {
|
||||
margin: Responsive.isDesktop(context)
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: 150)
|
||||
: EdgeInsets.symmetric(horizontal: 0),
|
||||
: EdgeInsets.symmetric(
|
||||
horizontal: 0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 45,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF00989E),
|
||||
backgroundColor:
|
||||
Color(0xFF00989E),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(10),
|
||||
@ -537,12 +554,15 @@ class _loginState extends State<login> {
|
||||
valueColor:
|
||||
AlwaysStoppedAnimation<
|
||||
Color>(
|
||||
Color(0xFF00989E)),
|
||||
Color(
|
||||
0xFF00989E)),
|
||||
)
|
||||
: Text(
|
||||
"Login With OTP",
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFFFFFFFF)),
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
color: Color(
|
||||
0xFFFFFFFF)),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -559,9 +579,11 @@ class _loginState extends State<login> {
|
||||
SizedBox(height: 30),
|
||||
Text(
|
||||
"Benefits of Login",
|
||||
style: GoogleFonts.poppins(
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontWeight:
|
||||
FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
@ -579,8 +601,8 @@ class _loginState extends State<login> {
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Container(
|
||||
padding:
|
||||
EdgeInsets.symmetric(
|
||||
padding: EdgeInsets
|
||||
.symmetric(
|
||||
vertical: 8),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
@ -595,7 +617,8 @@ class _loginState extends State<login> {
|
||||
12),
|
||||
decoration:
|
||||
BoxDecoration(
|
||||
border: Border(
|
||||
border:
|
||||
Border(
|
||||
right:
|
||||
BorderSide(
|
||||
width: 1,
|
||||
@ -612,7 +635,8 @@ class _loginState extends State<login> {
|
||||
color: Color(
|
||||
0xFFE26728)),
|
||||
SizedBox(
|
||||
height: 10),
|
||||
height:
|
||||
10),
|
||||
Text(
|
||||
"View Policy"),
|
||||
],
|
||||
@ -627,11 +651,14 @@ class _loginState extends State<login> {
|
||||
12),
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(Icons.edit,
|
||||
Icon(
|
||||
Icons
|
||||
.edit,
|
||||
color: Color(
|
||||
0xFFE26728)),
|
||||
SizedBox(
|
||||
height: 10),
|
||||
height:
|
||||
10),
|
||||
Text(
|
||||
"Manage Claims"),
|
||||
],
|
||||
@ -646,8 +673,8 @@ class _loginState extends State<login> {
|
||||
),
|
||||
)
|
||||
: SizedBox(
|
||||
height:
|
||||
Responsive.isDesktop(context)
|
||||
height: Responsive.isDesktop(
|
||||
context)
|
||||
? _size.height * 0.1
|
||||
: _size.height * 0.2,
|
||||
),
|
||||
@ -670,19 +697,23 @@ class _loginState extends State<login> {
|
||||
children: <InlineSpan>[
|
||||
WidgetSpan(
|
||||
child: MouseRegion(
|
||||
cursor:
|
||||
SystemMouseCursors.click,
|
||||
cursor: SystemMouseCursors
|
||||
.click,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context,
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
'privacypolicy');
|
||||
},
|
||||
child: Text(
|
||||
'privacy policy ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
color:
|
||||
Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
decoration: TextDecoration
|
||||
decoration:
|
||||
TextDecoration
|
||||
.underline,
|
||||
),
|
||||
),
|
||||
@ -698,19 +729,23 @@ class _loginState extends State<login> {
|
||||
),
|
||||
WidgetSpan(
|
||||
child: MouseRegion(
|
||||
cursor:
|
||||
SystemMouseCursors.click,
|
||||
cursor: SystemMouseCursors
|
||||
.click,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context, 'termsofuse');
|
||||
context,
|
||||
'termsofuse');
|
||||
},
|
||||
child: Text(
|
||||
'terms of use',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
color:
|
||||
Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
decoration: TextDecoration
|
||||
decoration:
|
||||
TextDecoration
|
||||
.underline,
|
||||
),
|
||||
),
|
||||
@ -752,6 +787,6 @@ class _loginState extends State<login> {
|
||||
),
|
||||
],
|
||||
)),
|
||||
));
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import 'package:nhance_app_pwa/pages/postEnrollment/service/api_service.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import '../../customAppBar/customAppBar.dart';
|
||||
import '../../customAppBar/customAppBarChatbot.dart';
|
||||
import 'data.dart';
|
||||
|
||||
class chatbot extends StatefulWidget {
|
||||
@ -318,7 +319,7 @@ class _chatbotState extends State<chatbot> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(),
|
||||
appBar: CustomAppBarChatbot(),
|
||||
body: DashChat(
|
||||
currentUser: user,
|
||||
onSend: (ChatMessage m) {
|
||||
|
||||
@ -768,6 +768,8 @@ class _claimprocessState extends State<claimprocess> {
|
||||
Navigator.pushNamed(context, 'profile');
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
@ -775,12 +777,14 @@ class _claimprocessState extends State<claimprocess> {
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
"Wellness",
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@ -653,6 +653,8 @@ class _claimsState extends State<claims> {
|
||||
Navigator.pushNamed(context, 'profile');
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
@ -660,12 +662,14 @@ class _claimsState extends State<claims> {
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
"Wellness",
|
||||
],
|
||||
initialIndex: 1, // Initial index of the bottom navigation bar
|
||||
),
|
||||
|
||||
@ -528,6 +528,8 @@ class _claimtracklistformState extends State<claimtracklist> {
|
||||
Navigator.pushNamed(context, 'profile');
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
@ -535,12 +537,14 @@ class _claimtracklistformState extends State<claimtracklist> {
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
"Wellness",
|
||||
], // Initial index of the bottom navigation bar
|
||||
),
|
||||
);
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
import 'package:dash_chat_2/dash_chat_2.dart';
|
||||
|
||||
// String profileImage =
|
||||
// 'https://e7.pngegg.com/pngimages/811/700/png-clipart-chatbot-internet-bot-business-natural-language-processing-facebook-messenger-business-people-logo-thumbnail.png';
|
||||
String profileImage =
|
||||
'https://e7.pngegg.com/pngimages/811/700/png-clipart-chatbot-internet-bot-business-natural-language-processing-facebook-messenger-business-people-logo-thumbnail.png';
|
||||
'https://dev.venbait.in/nhance/dev/public/assets/images/chatbot.png';
|
||||
|
||||
// We have all the possibilities for users
|
||||
ChatUser user = ChatUser(id: '0');
|
||||
|
||||
@ -780,6 +780,8 @@ class _generalExclusionsDeductiblesState
|
||||
Navigator.pushNamed(context, 'profile');
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
@ -787,12 +789,14 @@ class _generalExclusionsDeductiblesState
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
"Wellness",
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@ -9,6 +9,7 @@ import 'package:nhance_app_pwa/pages/postEnrollment/service/api_service.dart';
|
||||
import 'package:nhance_app_pwa/pages/postEnrollment/service/svg_service.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import '../../customAppBar/customFooter.dart';
|
||||
import '../../customAppBar/responsive.dart';
|
||||
import '../../customAppBar/tabs.dart';
|
||||
@ -162,6 +163,30 @@ class _helpState extends State<help> {
|
||||
}
|
||||
}
|
||||
|
||||
void _openDialPad(String phoneNumber) async {
|
||||
final url = 'tel:$phoneNumber';
|
||||
if (await canLaunch(url)) {
|
||||
await launch(url);
|
||||
} else {
|
||||
throw 'Could not open dial pad for $phoneNumber';
|
||||
}
|
||||
}
|
||||
|
||||
void _openEmail(String email) async {
|
||||
final Uri params = Uri(
|
||||
scheme: 'mailto',
|
||||
path: email,
|
||||
query:
|
||||
'subject=Your Subject&body=Hello', // Add default subject and body here
|
||||
);
|
||||
var url = params.toString();
|
||||
if (await canLaunch(url)) {
|
||||
await launch(url);
|
||||
} else {
|
||||
throw 'Could not open email client for $email';
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@ -224,8 +249,8 @@ class _helpState extends State<help> {
|
||||
children: [
|
||||
SvgPicture.string(
|
||||
SvgService.getSvg('help'),
|
||||
width: 300,
|
||||
height: 300,
|
||||
width: 150,
|
||||
height: 150,
|
||||
),
|
||||
],
|
||||
))),
|
||||
@ -235,15 +260,124 @@ class _helpState extends State<help> {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
if (accountManagerDetails != null)
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
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),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Nhance Account Manager Contact',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize:
|
||||
Responsive.isDesktop(context) ? 16 : 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF777777),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 10),
|
||||
child: Center(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment
|
||||
.center, // Center align the row
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
_openEmail(accountManagerEmail);
|
||||
},
|
||||
child: SvgPicture.string(
|
||||
SvgService.getSvg('email'),
|
||||
width: 20,
|
||||
height: 20,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10), // Space between icon and text
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
_openEmail(accountManagerEmail);
|
||||
},
|
||||
child: Text(
|
||||
accountManagerEmail ?? '',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: Responsive.isDesktop(context)
|
||||
? 16
|
||||
: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment
|
||||
.center, // Center align the row
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
_openDialPad(accountManagerMobileNo);
|
||||
},
|
||||
child: SvgPicture.string(
|
||||
SvgService.getSvg('smartphone'),
|
||||
width: 20,
|
||||
height: 20,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10), // Space between icon and text
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
_openDialPad(accountManagerMobileNo);
|
||||
},
|
||||
child: Text(
|
||||
accountManagerMobileNo ?? '',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: Responsive.isDesktop(context)
|
||||
? 16
|
||||
: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
]),
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 75,
|
||||
padding: Responsive.isDesktop(context)
|
||||
? EdgeInsets.only(top: 20, bottom: 20, left: 30, right: 30)
|
||||
: EdgeInsets.only(
|
||||
top: 10,
|
||||
bottom: 10,
|
||||
top: 5,
|
||||
bottom: 5,
|
||||
left: 10,
|
||||
right: 10), // Add padding to the container
|
||||
child: Row(
|
||||
@ -278,7 +412,7 @@ class _helpState extends State<help> {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
SizedBox(height: 5),
|
||||
if (trackClaimsList == null)
|
||||
Card(
|
||||
elevation: 0,
|
||||
@ -549,98 +683,6 @@ class _helpState extends State<help> {
|
||||
trackClaimsClosedList), // Replace 'yourDataList' with your actual data list
|
||||
),
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
if (accountManagerDetails != null)
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
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: 10, bottom: 10, left: 10, right: 10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Nhance Account Manager Contact',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize:
|
||||
Responsive.isDesktop(context) ? 16 : 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF777777),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 10),
|
||||
child: Center(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment
|
||||
.center, // Center align the row
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
SvgPicture.string(
|
||||
SvgService.getSvg('email'),
|
||||
width: 20,
|
||||
height: 20,
|
||||
),
|
||||
SizedBox(
|
||||
width: 10), // Space between icon and text
|
||||
Text(
|
||||
accountManagerEmail ?? '',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: Responsive.isDesktop(context)
|
||||
? 16
|
||||
: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height:
|
||||
10), // Space between email and mobile rows
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment
|
||||
.center, // Center align the row
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
SvgPicture.string(
|
||||
SvgService.getSvg('smartphone'),
|
||||
width: 20,
|
||||
height: 20,
|
||||
),
|
||||
SizedBox(
|
||||
width: 10), // Space between icon and text
|
||||
Text(
|
||||
accountManagerMobileNo ?? '',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: Responsive.isDesktop(context)
|
||||
? 16
|
||||
: 14,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
]),
|
||||
),
|
||||
SizedBox(height: Responsive.isDesktop(context) ? 40 : 10),
|
||||
]),
|
||||
)),
|
||||
@ -678,6 +720,8 @@ class _helpState extends State<help> {
|
||||
Navigator.pushNamed(context, 'profile');
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
@ -685,12 +729,14 @@ class _helpState extends State<help> {
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
"Wellness",
|
||||
],
|
||||
initialIndex: 3, // Initial index of the bottom navigation bar
|
||||
),
|
||||
@ -791,7 +837,10 @@ class _helpState extends State<help> {
|
||||
),
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Text(
|
||||
Container(
|
||||
width:
|
||||
150, // Set a fixed width or adjust based on your layout
|
||||
child: Text(
|
||||
claimsSubject,
|
||||
textAlign: TextAlign.left,
|
||||
style: GoogleFonts.poppins(
|
||||
@ -801,8 +850,12 @@ class _helpState extends State<help> {
|
||||
: 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF777777),
|
||||
), // Ensure text automatically wraps
|
||||
),
|
||||
overflow: TextOverflow
|
||||
.ellipsis, // Show ellipsis when text overflows
|
||||
maxLines: 1, // Limit to one line
|
||||
),
|
||||
)
|
||||
],
|
||||
))
|
||||
],
|
||||
|
||||
@ -636,6 +636,8 @@ class _MyAppState extends State<MyApp> {
|
||||
Navigator.pushNamed(context, 'profile');
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
@ -643,13 +645,9 @@ class _MyAppState extends State<MyApp> {
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
],
|
||||
labels: ["Home", "Claim", "Profile", "Help", "Wellness"],
|
||||
initialIndex: 0, // Initial index of the bottom navigation bar
|
||||
),
|
||||
);
|
||||
|
||||
@ -872,7 +872,7 @@ class _planclaimsformState extends State<planclaimsform> {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: Responsive.isDesktop(context) ? 40 : 10),
|
||||
SizedBox(height: Responsive.isDesktop(context) ? 40 : 60),
|
||||
]),
|
||||
)),
|
||||
if (Responsive.isDesktop(context))
|
||||
@ -910,6 +910,8 @@ class _planclaimsformState extends State<planclaimsform> {
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
// Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
@ -917,12 +919,14 @@ class _planclaimsformState extends State<planclaimsform> {
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
"Wellness",
|
||||
], // Initial index of the bottom navigation bar
|
||||
),
|
||||
);
|
||||
|
||||
@ -100,11 +100,16 @@ class _policiesState extends State<policies> {
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
_launchURL(String ecardURL) async {
|
||||
if (await canLaunch(ecardURL)) {
|
||||
await launch(ecardURL);
|
||||
// Function to open URL in the default browser
|
||||
Future<void> _launchURL(String url) async {
|
||||
final Uri uri = Uri.parse(url); // Parse the URL properly
|
||||
print('_launchURL $uri');
|
||||
if (uri != null) {
|
||||
print('If $uri');
|
||||
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} else {
|
||||
print('Could not launch $ecardURL');
|
||||
print('else $uri');
|
||||
throw 'Could not launch $url';
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,8 +240,14 @@ class _policiesState extends State<policies> {
|
||||
: 180,
|
||||
child: TextButton(
|
||||
onPressed: () {
|
||||
if (argumentsData['eCardDownload'] !=
|
||||
null) {
|
||||
_launchURL(
|
||||
argumentsData['eCardDownload']);
|
||||
} else {
|
||||
ToastHelper.showInfoToast(
|
||||
context, 'Not Generated');
|
||||
}
|
||||
},
|
||||
style: TextButton.styleFrom(
|
||||
padding: EdgeInsets.only(
|
||||
@ -963,6 +974,8 @@ class _policiesState extends State<policies> {
|
||||
Navigator.pushNamed(context, 'profile');
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
@ -970,12 +983,14 @@ class _policiesState extends State<policies> {
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
"Wellness",
|
||||
], // Initial index of the bottom navigation bar
|
||||
),
|
||||
);
|
||||
@ -1000,19 +1015,19 @@ class _policiesState extends State<policies> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
buildExpandedColumn(
|
||||
context, 'Cover Amount', '₹ ${argumentsData['si_value']}'),
|
||||
buildExpandedColumn(
|
||||
context, 'Policy No', argumentsData['policy_no']),
|
||||
// buildExpandedColumn(context, '', ''),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
buildExpandedColumn(
|
||||
context, 'Cover Amount', '₹ ${argumentsData['si_value']}'),
|
||||
buildExpandedColumn(context, 'Policy Expiry',
|
||||
convertDateFormat(argumentsData['policy_end_date'])),
|
||||
buildExpandedColumn(context, '', ''),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@ -676,6 +676,8 @@ class _profileState extends State<profile> {
|
||||
Navigator.pushNamed(context, 'profile');
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
@ -683,12 +685,14 @@ class _profileState extends State<profile> {
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
"Wellness",
|
||||
],
|
||||
initialIndex: 2, // Initial index of the bottom navigation bar
|
||||
),
|
||||
|
||||
217
lib/pages/postEnrollment/wellness.dart
Normal file
217
lib/pages/postEnrollment/wellness.dart
Normal file
@ -0,0 +1,217 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:nhance_app_pwa/customAppBar/customAppBar.dart';
|
||||
import 'package:nhance_app_pwa/pages/postEnrollment/service/svg_service.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../../customAppBar/customFooter.dart';
|
||||
import '../../customAppBar/responsive.dart';
|
||||
import '../../customAppBar/tabs.dart';
|
||||
|
||||
class wellness extends StatefulWidget {
|
||||
const wellness({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<wellness> createState() => _wellnessState();
|
||||
}
|
||||
|
||||
class _wellnessState extends State<wellness> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
// Function to open URL in the default browser
|
||||
Future<void> _launchURL(String url) async {
|
||||
final Uri uri = Uri.parse(url); // Parse the URL properly
|
||||
print('_launchURL $uri');
|
||||
if (uri != null) {
|
||||
print('If $uri');
|
||||
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
} else {
|
||||
print('else $uri');
|
||||
throw 'Could not launch $url';
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: CustomAppBar(),
|
||||
body: Stack(children: [
|
||||
SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment
|
||||
.center, // Center both text and button vertically
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: Responsive.isDesktop(context)
|
||||
? 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,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 12,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, 'home');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Icon(
|
||||
Icons
|
||||
.chevron_left, // Replace with your desired icon
|
||||
color: Color(0xFF000000),
|
||||
size: 30,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 12,
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.string(
|
||||
SvgService.getSvg('help'),
|
||||
width: 200,
|
||||
height: 200,
|
||||
),
|
||||
],
|
||||
))),
|
||||
],
|
||||
),
|
||||
// Add more rows as needed
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
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),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Nhance Account Manager Contact\nWellness is the active pursuit of activities and lifestyle choices that contribute to holistic physical, mental, and emotional well-being. It involves balancing various aspects of health to achieve a fulfilling and healthy life.',
|
||||
textAlign:
|
||||
TextAlign.center, // Center align the text
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize:
|
||||
Responsive.isDesktop(context) ? 16 : 12,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF777777),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
SizedBox(height: 20), // Space between text and button
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
_launchURL(
|
||||
'https://venbait.in/nhance/dev/download-e-card/Oef7qV'); // Redirect to the browser on button click
|
||||
},
|
||||
child: Text(
|
||||
'Wellness',
|
||||
style: GoogleFonts.poppins(color: Colors.white),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFFE26728),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (Responsive.isDesktop(context))
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
width: double.infinity, // Make the footer full width
|
||||
child: CustomFooter(),
|
||||
),
|
||||
),
|
||||
]),
|
||||
floatingActionButton: Responsive.isDesktop(context)
|
||||
? null
|
||||
: FloatingActionButton(
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, 'chatbot');
|
||||
},
|
||||
child: Icon(Icons.chat),
|
||||
),
|
||||
floatingActionButtonLocation: Responsive.isDesktop(context)
|
||||
? null
|
||||
: FloatingActionButtonLocation.miniEndFloat,
|
||||
bottomNavigationBar: Responsive.isDesktop(context)
|
||||
? null
|
||||
: CustomBottomNavigationBar(
|
||||
onTabChanged: (index) {
|
||||
// Add your navigation logic here
|
||||
// For example:
|
||||
if (index == 0) {
|
||||
Navigator.pushNamed(context, 'home');
|
||||
} else if (index == 1) {
|
||||
Navigator.pushNamed(context, 'claims');
|
||||
} else if (index == 2) {
|
||||
Navigator.pushNamed(context, 'profile');
|
||||
} else if (index == 3) {
|
||||
Navigator.pushNamed(context, 'help');
|
||||
} else if (index == 4) {
|
||||
Navigator.pushNamed(context, 'wellness');
|
||||
}
|
||||
},
|
||||
icons: [
|
||||
Icons.home_outlined,
|
||||
Icons.sticky_note_2_outlined,
|
||||
Icons.person_outline_outlined,
|
||||
Icons.headset_mic_outlined,
|
||||
Icons.health_and_safety_outlined,
|
||||
],
|
||||
labels: [
|
||||
"Home",
|
||||
"Claim",
|
||||
"Profile",
|
||||
"Help",
|
||||
"Wellness",
|
||||
],
|
||||
initialIndex: 4, // Initial index of the bottom navigation bar
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -104,7 +104,7 @@ class _pinPageState extends State<pinPage> {
|
||||
final token = prefs.getString('token');
|
||||
if (token != null && token.isNotEmpty) {
|
||||
ToastHelper.showSuccessToast(context, 'Successfully Login');
|
||||
if (emp_status == 'enrolled') {
|
||||
if (emp_status == 'enrolled' || emp_status == 'active') {
|
||||
Navigator.pushReplacementNamed(context, 'home');
|
||||
} else {
|
||||
Navigator.pushReplacementNamed(context, 'empDetails');
|
||||
@ -237,7 +237,11 @@ class _pinPageState extends State<pinPage> {
|
||||
),
|
||||
);
|
||||
|
||||
return Scaffold(
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
return false;
|
||||
},
|
||||
child: Scaffold(
|
||||
body: Container(
|
||||
color: Colors.white, // Set the color for the body
|
||||
child: SizedBox.expand(
|
||||
@ -351,7 +355,8 @@ class _pinPageState extends State<pinPage> {
|
||||
children: [
|
||||
SizedBox(height: 40),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
margin:
|
||||
EdgeInsets.symmetric(
|
||||
horizontal: 30),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
@ -368,7 +373,8 @@ class _pinPageState extends State<pinPage> {
|
||||
color: Color(
|
||||
0xFF909090),
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
FontWeight
|
||||
.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -376,22 +382,27 @@ class _pinPageState extends State<pinPage> {
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
margin:
|
||||
EdgeInsets.symmetric(
|
||||
horizontal: 0),
|
||||
child: Pinput(
|
||||
length: 4,
|
||||
defaultPinTheme:
|
||||
defaultPinTheme,
|
||||
separatorBuilder: (index) =>
|
||||
const SizedBox(width: 8),
|
||||
separatorBuilder:
|
||||
(index) =>
|
||||
const SizedBox(
|
||||
width: 8),
|
||||
showCursor: true,
|
||||
controller: _pinController,
|
||||
controller:
|
||||
_pinController,
|
||||
validator: _validatePin,
|
||||
errorPinTheme: defaultPinTheme
|
||||
errorPinTheme:
|
||||
defaultPinTheme
|
||||
.copyBorderWith(
|
||||
border: Border.all(
|
||||
color:
|
||||
Colors.redAccent),
|
||||
color: Colors
|
||||
.redAccent),
|
||||
),
|
||||
hapticFeedbackType:
|
||||
HapticFeedbackType
|
||||
@ -406,11 +417,14 @@ class _pinPageState extends State<pinPage> {
|
||||
},
|
||||
cursor: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
MainAxisAlignment
|
||||
.end,
|
||||
children: [
|
||||
Container(
|
||||
margin: const EdgeInsets
|
||||
.only(bottom: 9),
|
||||
margin:
|
||||
const EdgeInsets
|
||||
.only(
|
||||
bottom: 9),
|
||||
width: 22,
|
||||
height: 1,
|
||||
color:
|
||||
@ -419,27 +433,31 @@ class _pinPageState extends State<pinPage> {
|
||||
],
|
||||
),
|
||||
focusedPinTheme:
|
||||
defaultPinTheme.copyWith(
|
||||
decoration: defaultPinTheme
|
||||
defaultPinTheme
|
||||
.copyWith(
|
||||
decoration:
|
||||
defaultPinTheme
|
||||
.decoration!
|
||||
.copyWith(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
8),
|
||||
BorderRadius
|
||||
.circular(8),
|
||||
border: Border.all(
|
||||
color:
|
||||
focusedBorderColor),
|
||||
),
|
||||
),
|
||||
submittedPinTheme:
|
||||
defaultPinTheme.copyWith(
|
||||
decoration: defaultPinTheme
|
||||
defaultPinTheme
|
||||
.copyWith(
|
||||
decoration:
|
||||
defaultPinTheme
|
||||
.decoration!
|
||||
.copyWith(
|
||||
color: fillColor,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
19),
|
||||
BorderRadius
|
||||
.circular(19),
|
||||
border: Border.all(
|
||||
color:
|
||||
focusedBorderColor),
|
||||
@ -449,7 +467,8 @@ class _pinPageState extends State<pinPage> {
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
margin:
|
||||
EdgeInsets.symmetric(
|
||||
horizontal: 30),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
@ -463,7 +482,8 @@ class _pinPageState extends State<pinPage> {
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(10),
|
||||
.circular(
|
||||
10),
|
||||
),
|
||||
),
|
||||
onPressed: () async {
|
||||
@ -471,8 +491,8 @@ class _pinPageState extends State<pinPage> {
|
||||
},
|
||||
child: Text(
|
||||
"Submit",
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
style: GoogleFonts
|
||||
.poppins(
|
||||
color: Color(
|
||||
0xFFFFFFFF)),
|
||||
),
|
||||
@ -483,7 +503,8 @@ class _pinPageState extends State<pinPage> {
|
||||
Container(
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
MainAxisAlignment
|
||||
.center,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
@ -491,13 +512,14 @@ class _pinPageState extends State<pinPage> {
|
||||
},
|
||||
child: Text(
|
||||
'Forget PIN?',
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
style: GoogleFonts
|
||||
.poppins(
|
||||
fontSize: 12,
|
||||
color:
|
||||
Color(0xFF929292),
|
||||
color: Color(
|
||||
0xFF929292),
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
FontWeight
|
||||
.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -559,6 +581,6 @@ class _pinPageState extends State<pinPage> {
|
||||
),
|
||||
),
|
||||
]),
|
||||
)));
|
||||
))));
|
||||
}
|
||||
}
|
||||
|
||||
@ -173,7 +173,11 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
),
|
||||
);
|
||||
|
||||
return Scaffold(
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
return false;
|
||||
},
|
||||
child: Scaffold(
|
||||
body: Container(
|
||||
color: Colors.white, // Set the color for the body
|
||||
child: SizedBox.expand(
|
||||
@ -286,7 +290,8 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
children: [
|
||||
SizedBox(height: 40),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
margin:
|
||||
EdgeInsets.symmetric(
|
||||
horizontal: 30),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
@ -303,7 +308,8 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
color: Color(
|
||||
0xFF909090),
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
FontWeight
|
||||
.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -311,22 +317,27 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
margin:
|
||||
EdgeInsets.symmetric(
|
||||
horizontal: 0),
|
||||
child: Pinput(
|
||||
length: 4,
|
||||
defaultPinTheme:
|
||||
defaultPinTheme,
|
||||
separatorBuilder: (index) =>
|
||||
const SizedBox(width: 8),
|
||||
separatorBuilder:
|
||||
(index) =>
|
||||
const SizedBox(
|
||||
width: 8),
|
||||
showCursor: true,
|
||||
controller: _pinController,
|
||||
controller:
|
||||
_pinController,
|
||||
validator: _validatePin,
|
||||
errorPinTheme: defaultPinTheme
|
||||
errorPinTheme:
|
||||
defaultPinTheme
|
||||
.copyBorderWith(
|
||||
border: Border.all(
|
||||
color:
|
||||
Colors.redAccent),
|
||||
color: Colors
|
||||
.redAccent),
|
||||
),
|
||||
hapticFeedbackType:
|
||||
HapticFeedbackType
|
||||
@ -341,11 +352,14 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
},
|
||||
cursor: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
MainAxisAlignment
|
||||
.end,
|
||||
children: [
|
||||
Container(
|
||||
margin: const EdgeInsets
|
||||
.only(bottom: 9),
|
||||
margin:
|
||||
const EdgeInsets
|
||||
.only(
|
||||
bottom: 9),
|
||||
width: 22,
|
||||
height: 1,
|
||||
color:
|
||||
@ -354,27 +368,31 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
],
|
||||
),
|
||||
focusedPinTheme:
|
||||
defaultPinTheme.copyWith(
|
||||
decoration: defaultPinTheme
|
||||
defaultPinTheme
|
||||
.copyWith(
|
||||
decoration:
|
||||
defaultPinTheme
|
||||
.decoration!
|
||||
.copyWith(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
8),
|
||||
BorderRadius
|
||||
.circular(8),
|
||||
border: Border.all(
|
||||
color:
|
||||
focusedBorderColor),
|
||||
),
|
||||
),
|
||||
submittedPinTheme:
|
||||
defaultPinTheme.copyWith(
|
||||
decoration: defaultPinTheme
|
||||
defaultPinTheme
|
||||
.copyWith(
|
||||
decoration:
|
||||
defaultPinTheme
|
||||
.decoration!
|
||||
.copyWith(
|
||||
color: fillColor,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
19),
|
||||
BorderRadius
|
||||
.circular(19),
|
||||
border: Border.all(
|
||||
color:
|
||||
focusedBorderColor),
|
||||
@ -384,7 +402,8 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
margin:
|
||||
EdgeInsets.symmetric(
|
||||
horizontal: 30),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
@ -401,7 +420,8 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
color: Color(
|
||||
0xFF909090),
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
FontWeight
|
||||
.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -409,8 +429,8 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Container(
|
||||
margin: Responsive.isDesktop(
|
||||
context)
|
||||
margin: Responsive
|
||||
.isDesktop(context)
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: 150)
|
||||
: EdgeInsets.symmetric(
|
||||
@ -419,18 +439,21 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
length: 4,
|
||||
defaultPinTheme:
|
||||
defaultPinTheme,
|
||||
separatorBuilder: (index) =>
|
||||
const SizedBox(width: 8),
|
||||
separatorBuilder:
|
||||
(index) =>
|
||||
const SizedBox(
|
||||
width: 8),
|
||||
showCursor: true,
|
||||
controller:
|
||||
_confirmPinController,
|
||||
validator:
|
||||
_validateConfirmPin,
|
||||
errorPinTheme: defaultPinTheme
|
||||
errorPinTheme:
|
||||
defaultPinTheme
|
||||
.copyBorderWith(
|
||||
border: Border.all(
|
||||
color:
|
||||
Colors.redAccent),
|
||||
color: Colors
|
||||
.redAccent),
|
||||
),
|
||||
hapticFeedbackType:
|
||||
HapticFeedbackType
|
||||
@ -445,11 +468,14 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
},
|
||||
cursor: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
MainAxisAlignment
|
||||
.end,
|
||||
children: [
|
||||
Container(
|
||||
margin: const EdgeInsets
|
||||
.only(bottom: 9),
|
||||
margin:
|
||||
const EdgeInsets
|
||||
.only(
|
||||
bottom: 9),
|
||||
width: 22,
|
||||
height: 1,
|
||||
color:
|
||||
@ -458,27 +484,31 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
],
|
||||
),
|
||||
focusedPinTheme:
|
||||
defaultPinTheme.copyWith(
|
||||
decoration: defaultPinTheme
|
||||
defaultPinTheme
|
||||
.copyWith(
|
||||
decoration:
|
||||
defaultPinTheme
|
||||
.decoration!
|
||||
.copyWith(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
8),
|
||||
BorderRadius
|
||||
.circular(8),
|
||||
border: Border.all(
|
||||
color:
|
||||
focusedBorderColor),
|
||||
),
|
||||
),
|
||||
submittedPinTheme:
|
||||
defaultPinTheme.copyWith(
|
||||
decoration: defaultPinTheme
|
||||
defaultPinTheme
|
||||
.copyWith(
|
||||
decoration:
|
||||
defaultPinTheme
|
||||
.decoration!
|
||||
.copyWith(
|
||||
color: fillColor,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
19),
|
||||
BorderRadius
|
||||
.circular(19),
|
||||
border: Border.all(
|
||||
color:
|
||||
focusedBorderColor),
|
||||
@ -488,7 +518,8 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
margin:
|
||||
EdgeInsets.symmetric(
|
||||
horizontal: 30),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
@ -497,13 +528,14 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
children: [
|
||||
Text(
|
||||
'Enable Biometric',
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
style: GoogleFonts
|
||||
.poppins(
|
||||
fontSize: 12,
|
||||
color:
|
||||
Color(0xFF000000),
|
||||
color: Color(
|
||||
0xFF000000),
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
FontWeight
|
||||
.w400,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
@ -515,7 +547,8 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
child: Switch(
|
||||
value:
|
||||
_enableBiometric,
|
||||
onChanged: (value) {
|
||||
onChanged:
|
||||
(value) {
|
||||
setState(() {
|
||||
_enableBiometric =
|
||||
value;
|
||||
@ -523,7 +556,8 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
},
|
||||
activeColor: Color(
|
||||
0xFFE26728), // Color when the switch is ON
|
||||
inactiveTrackColor: Color(
|
||||
inactiveTrackColor:
|
||||
Color(
|
||||
0xFFD8D8D8), // Color of the switch track when OFF
|
||||
),
|
||||
),
|
||||
@ -531,7 +565,8 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
margin:
|
||||
EdgeInsets.symmetric(
|
||||
horizontal: 30),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
@ -545,7 +580,8 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(10),
|
||||
.circular(
|
||||
10),
|
||||
),
|
||||
),
|
||||
onPressed: () async {
|
||||
@ -553,8 +589,8 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
},
|
||||
child: Text(
|
||||
"Save",
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
style: GoogleFonts
|
||||
.poppins(
|
||||
color: Color(
|
||||
0xFFFFFFFF)),
|
||||
),
|
||||
@ -565,7 +601,8 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
Container(
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
MainAxisAlignment
|
||||
.center,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
@ -573,13 +610,14 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
},
|
||||
child: Text(
|
||||
'Skip ?',
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
style: GoogleFonts
|
||||
.poppins(
|
||||
fontSize: 12,
|
||||
color:
|
||||
Color(0xFF929292),
|
||||
color: Color(
|
||||
0xFF929292),
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
FontWeight
|
||||
.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -642,6 +680,6 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
),
|
||||
),
|
||||
]),
|
||||
)));
|
||||
))));
|
||||
}
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
} else {
|
||||
if (token != null && token.isNotEmpty) {
|
||||
ToastHelper.showSuccessToast(context, 'Successfully Login');
|
||||
if (emp_status == 'enrolled') {
|
||||
if (emp_status == 'enrolled' || emp_status == 'active') {
|
||||
Navigator.pushReplacementNamed(context, 'home');
|
||||
} else {
|
||||
Navigator.pushReplacementNamed(context, 'empDetails');
|
||||
@ -386,7 +386,12 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
),
|
||||
);
|
||||
|
||||
return Scaffold(
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
Navigator.pushReplacementNamed(context, 'login');
|
||||
return false;
|
||||
},
|
||||
child: Scaffold(
|
||||
body: SingleChildScrollView(
|
||||
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
|
||||
child: Container(
|
||||
@ -417,7 +422,9 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
.center, // Align to the center
|
||||
children: [
|
||||
Expanded(
|
||||
flex: Responsive.isDesktop(context) ? 10 : 12,
|
||||
flex: Responsive.isDesktop(context)
|
||||
? 10
|
||||
: 12,
|
||||
child: Align(
|
||||
alignment: Responsive.isDesktop(context)
|
||||
? Alignment.centerLeft
|
||||
@ -492,7 +499,8 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
? EdgeInsets.only(left: 20, right: 20)
|
||||
: EdgeInsets.only(left: 0, right: 0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
if (!Responsive.isMobile(context) &&
|
||||
!Responsive.isTablet(context))
|
||||
@ -501,8 +509,8 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
Expanded(
|
||||
flex: 10,
|
||||
child: Align(
|
||||
alignment: Responsive.isDesktop(
|
||||
context)
|
||||
alignment: Responsive
|
||||
.isDesktop(context)
|
||||
? Alignment.centerLeft
|
||||
: Alignment
|
||||
.bottomCenter, // Align to the start
|
||||
@ -531,7 +539,8 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
margin: Responsive.isDesktop(context)
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: 150)
|
||||
: EdgeInsets.symmetric(horizontal: 0),
|
||||
: EdgeInsets.symmetric(
|
||||
horizontal: 0),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
@ -551,7 +560,8 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
margin: Responsive.isDesktop(context)
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: 150)
|
||||
: EdgeInsets.symmetric(horizontal: 0),
|
||||
: EdgeInsets.symmetric(
|
||||
horizontal: 0),
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
@ -568,7 +578,8 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
fontSize: 12,
|
||||
color: Color(
|
||||
0xFFE26728)), // Change color as desired
|
||||
recognizer: TapGestureRecognizer()
|
||||
recognizer:
|
||||
TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
// Navigate to the page where the user can change the phone number
|
||||
Navigator.pushNamed(
|
||||
@ -584,7 +595,8 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
margin: Responsive.isDesktop(context)
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: 150)
|
||||
: EdgeInsets.symmetric(horizontal: 0),
|
||||
: EdgeInsets.symmetric(
|
||||
horizontal: 0),
|
||||
child: Pinput(
|
||||
length: 6,
|
||||
// defaultPinTheme: defaultPinTheme,
|
||||
@ -599,7 +611,8 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
margin: Responsive.isDesktop(context)
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: 150)
|
||||
: EdgeInsets.symmetric(horizontal: 0),
|
||||
: EdgeInsets.symmetric(
|
||||
horizontal: 0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment
|
||||
.end, // Align text to the right
|
||||
@ -607,8 +620,10 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
_isTimerRunning
|
||||
? Text(
|
||||
"Resend OTP in $_secondsRemaining seconds",
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.black),
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
color:
|
||||
Colors.black),
|
||||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
@ -616,8 +631,10 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
},
|
||||
child: Text(
|
||||
"Resend OTP",
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.blue),
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
color: Colors
|
||||
.blue),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -628,13 +645,15 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
margin: Responsive.isDesktop(context)
|
||||
? EdgeInsets.symmetric(
|
||||
horizontal: 150)
|
||||
: EdgeInsets.symmetric(horizontal: 0),
|
||||
: EdgeInsets.symmetric(
|
||||
horizontal: 0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 45,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF00989E),
|
||||
backgroundColor:
|
||||
Color(0xFF00989E),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(10),
|
||||
@ -645,7 +664,8 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
.validate()) {
|
||||
_formKey.currentState!
|
||||
.save(); // Save form fields before calling verifyOTP
|
||||
verifyOTP(_otpController.text);
|
||||
verifyOTP(
|
||||
_otpController.text);
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
@ -665,9 +685,11 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
SizedBox(height: 20),
|
||||
Text(
|
||||
"Benefits of Login",
|
||||
style: GoogleFonts.poppins(
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontWeight:
|
||||
FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
@ -685,8 +707,8 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Container(
|
||||
padding:
|
||||
EdgeInsets.symmetric(
|
||||
padding: EdgeInsets
|
||||
.symmetric(
|
||||
vertical: 8),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
@ -701,7 +723,8 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
12),
|
||||
decoration:
|
||||
BoxDecoration(
|
||||
border: Border(
|
||||
border:
|
||||
Border(
|
||||
right:
|
||||
BorderSide(
|
||||
width: 1,
|
||||
@ -718,7 +741,8 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
color: Color(
|
||||
0xFFE26728)),
|
||||
SizedBox(
|
||||
height: 10),
|
||||
height:
|
||||
10),
|
||||
Text(
|
||||
"View Policy",
|
||||
style: GoogleFonts
|
||||
@ -735,11 +759,14 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
12),
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(Icons.edit,
|
||||
Icon(
|
||||
Icons
|
||||
.edit,
|
||||
color: Color(
|
||||
0xFFE26728)),
|
||||
SizedBox(
|
||||
height: 10),
|
||||
height:
|
||||
10),
|
||||
Text(
|
||||
"Manage Claims",
|
||||
style: GoogleFonts
|
||||
@ -756,8 +783,8 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
),
|
||||
)
|
||||
: SizedBox(
|
||||
height:
|
||||
Responsive.isDesktop(context)
|
||||
height: Responsive.isDesktop(
|
||||
context)
|
||||
? _size.height * 0.1
|
||||
: _size.height * 0.2,
|
||||
),
|
||||
@ -834,6 +861,6 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
),
|
||||
],
|
||||
)),
|
||||
));
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,6 +54,7 @@ dependencies:
|
||||
firebase_auth: ^5.1.2
|
||||
local_auth: ^2.2.0
|
||||
google_sign_in: ^6.2.1
|
||||
dio: ^5.7.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user