employee new flow design done

This commit is contained in:
Venba 2024-03-30 17:08:13 +05:30
parent 89bcd6e3d6
commit d78c46be9d
14 changed files with 3469 additions and 702 deletions

BIN
assets/Group.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
assets/Group_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
assets/Vector.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

BIN
assets/partnerLogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

974
lib/addons.dart Normal file
View File

@ -0,0 +1,974 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'customAppBar/customAppBar.dart';
class addOnsDetails extends StatefulWidget {
const addOnsDetails({Key? key}) : super(key: key);
@override
State<addOnsDetails> createState() => _addOnsDetailsState();
}
class _addOnsDetailsState extends State<addOnsDetails> {
bool _isSwitched = false; // Declare the _isSwitched variable here
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(),
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.symmetric(
horizontal: MediaQuery.of(context).size.width *
0.1, // 30% of screen width as horizontal padding
vertical: MediaQuery.of(context).size.height *
0.03, // 5% of screen height as vertical padding
),
color: Color(0xFFEFF3F6),
child: Column(
children: [
Card(
elevation: 0,
child: Container(
width: double.infinity,
height: 75,
padding: EdgeInsets.only(
top: 20,
bottom: 20,
left: 30,
right: 30), // Add padding to the container
child: Row(
children: [
Expanded(
flex: 6,
child: Container(
width: 150,
height: 150,
alignment: Alignment.centerLeft,
child: Image.asset(
'assets/Group.png',
width: 80, // Set the width of the image
height: 80, // Set the height of the image
fit: BoxFit.contain, // Adjust the fit as needed
),
)),
Expanded(
flex: 6,
child: Text(
'Bharti Airtel',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
)
],
),
),
),
SizedBox(height: 16),
Card(
elevation: 0,
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Color(
0xFFFFF1DD), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Plan Name',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
Text(
'Group Personal Accident Coverage',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'Floater Sum Insured',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 18,
),
),
Text(
'₹ 3,00,000',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
padding: EdgeInsets.only(
top: 0, bottom: 0, left: 15, right: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: 10), // Space between icon and text
Expanded(
child: Text(
'Employee Name • Self • DOB - 22/10/1997',
style: TextStyle(
fontSize: 18,
color: Color(0xFF232526),
),
),
),
],
),
],
),
),
],
),
)),
SizedBox(height: 16),
Card(
elevation: 0,
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Color(
0xFFFFF1DD), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Plan Name',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
Text(
'Group Medical Coverage',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'Floater Sum Insured',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 18,
),
),
Text(
'₹ 3,00,000',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
padding: EdgeInsets.only(
top: 0, bottom: 0, left: 15, right: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: 10), // Space between icon and text
Expanded(
child: Text(
'Employee Name • Self • DOB - 22/10/1997',
style: TextStyle(
fontSize: 18,
color: Color(0xFF232526),
),
),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: 10), // Space between icon and text
Expanded(
child: Text(
'Spouse Name • Spouse • DOB - 22/10/1997',
style: TextStyle(
fontSize: 18,
color: Color(0xFF232526),
),
),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: 10), // Space between icon and text
Expanded(
child: Text(
'Sons Name • Son • DOB - 22/10/1997',
style: TextStyle(
fontSize: 18,
color: Color(0xFF232526),
),
),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: 10), // Space between icon and text
Expanded(
child: Text(
'Daughters Name • Daughter • DOB - 22/10/1997',
style: TextStyle(
fontSize: 18,
color: Color(0xFF232526),
),
),
),
],
),
],
),
),
],
),
)),
SizedBox(height: 16),
Card(
elevation: 0,
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: [
Container(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 12,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Add Ons',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
color: Color(0xFF181818)),
),
Text(
'Increase your medical cover for your family or add parents or parent in laws by paying additional premium',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
color: Color(0xFF181818),
),
),
],
))),
],
),
),
],
),
)),
SizedBox(height: 16),
Card(
elevation: 0,
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Color(
0xFFDDF3FF), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 25, bottom: 25, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Add On Name',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
Text(
'Group Medical Coverage - Top Up',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Switch(
value: _isSwitched,
onChanged: (value) {
setState(() {
_isSwitched = value;
// Add your logic here based on the toggle state
});
},
activeColor: Color(
0xFFE26728), // Color when the switch is ON
inactiveTrackColor: Colors
.grey, // Color of the switch track when OFF
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
decoration: BoxDecoration(
color: Color(
0xFFDDF3FF), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 25, bottom: 25, left: 25, right: 25),
child: Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Add On Name',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
Text(
'Group Medical Coverage - Add Parents',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
Expanded(
flex: 3,
child: Container(
width: 50,
alignment: Alignment.center,
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
DropdownButtonFormField<String>(
onChanged: (value) {},
decoration: InputDecoration(
border:
OutlineInputBorder(),
hintText: 'Sum Insured',
labelText: 'Sum Insured',
contentPadding:
EdgeInsets.symmetric(
vertical: 5,
horizontal: 5),
),
value: null,
items: [
DropdownMenuItem(
value: 'Item 1',
child: Text('₹ 3,00,000'),
),
DropdownMenuItem(
value: 'Item 2',
child: Text('₹ 4,00,000'),
),
],
),
],
))),
Expanded(
flex: 3,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Switch(
value: _isSwitched,
onChanged: (value) {
setState(() {
_isSwitched = value;
// Add your logic here based on the toggle state
});
},
activeColor: Color(
0xFFE26728), // Color when the switch is ON
inactiveTrackColor: Colors
.grey, // Color of the switch track when OFF
),
],
))),
],
),
SizedBox(height: 20),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 4,
child: Container(
width: 50,
alignment: Alignment.center,
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
DropdownButtonFormField<String>(
onChanged: (value) {},
decoration: InputDecoration(
border:
OutlineInputBorder(),
hintText: 'Relationship',
labelText: 'Relationship',
contentPadding:
EdgeInsets.symmetric(
vertical: 5,
horizontal: 5),
),
value: null,
items: [
DropdownMenuItem(
value: 'Item 1',
child: Text('Father'),
),
DropdownMenuItem(
value: 'Item 2',
child: Text('Mother'),
),
],
),
],
))),
SizedBox(width: 10),
Expanded(
flex: 4,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
child: TextFormField(
onChanged: (value) => null,
decoration: InputDecoration(
border:
OutlineInputBorder(),
hintText:
'Member Full Name',
labelText:
'Member Full Name',
contentPadding:
EdgeInsets.symmetric(
vertical: 10,
horizontal: 15),
),
validator: (value) {
if (value == null ||
value.isEmpty) {
return 'Member Full Name is required';
}
return null;
},
),
)
],
))),
SizedBox(width: 10),
Expanded(
flex: 4,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Container(
child: TextFormField(
onChanged: (value) => null,
decoration: InputDecoration(
border:
OutlineInputBorder(),
hintText: 'DD-MM-YYYY',
labelText:
'Date of Birth',
contentPadding:
EdgeInsets.symmetric(
vertical: 10,
horizontal: 15),
),
validator: (value) {
if (value == null ||
value.isEmpty) {
return 'Date of Birth is required';
}
return null;
},
),
)
],
))),
],
),
SizedBox(height: 10),
Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
flex: 12,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Align(
alignment:
Alignment.centerRight,
child: SizedBox(
width:
180, // Set the desired width
child: TextButton(
onPressed: () => null,
child: Row(
mainAxisAlignment:
MainAxisAlignment
.end,
children: [
Icon(
Icons
.person_remove,
color: Color(
0xFF62696C), // Set the color of the icon
),
SizedBox(
width:
8), // Add space between icon and text
Text(
'Remove',
style: TextStyle(
color: Color(
0xFF62696C), // Set the color of the text
),
)
],
),
),
),
),
],
))),
]),
SizedBox(height: 20),
Container(
decoration: BoxDecoration(
border: Border.all(
color:
Color(0xFF000000), // Set border color
width: 1, // Set border width
),
// Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Container(
alignment: Alignment.center,
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.all(
5), // Padding around the icon
decoration: BoxDecoration(
color: Color(
0xFF6A6A6A), // Background color of the icon container
borderRadius:
BorderRadius.circular(
5), // Radius of the container
),
child: Icon(
Icons
.person_add, // Icon data
color: Colors.white,
size:
20, // Color of the icon
),
),
],
))),
Expanded(
flex: 11,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Add Parent',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 22,
fontWeight:
FontWeight.w500,
),
),
],
))),
],
),
),
SizedBox(height: 20),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 5,
child: Container(
alignment: Alignment.center,
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Text(
'Additional Premium',
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
Text(
'₹3099/Year',
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 18,
),
),
],
))),
Expanded(
flex: 2,
child: Container(
alignment: Alignment.center,
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Text(
'GST',
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
Text(
'₹557.82/-',
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 18,
),
),
],
))),
Expanded(
flex: 5,
child: Container(
alignment: Alignment.center,
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Text(
'Total Payable',
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
Text(
'₹3656.82/Year',
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 18,
),
),
],
))),
],
),
],
)),
],
),
)),
SizedBox(height: 16),
Card(
elevation: 0,
child: Container(
width: double.infinity,
height: 75,
padding: EdgeInsets.only(
top: 20,
bottom: 20,
left: 30,
right: 30), // Add padding to the container
child: Row(
children: [
Expanded(
flex: 6,
child: Container(
width: 150,
height: 150,
alignment: Alignment.centerLeft,
child: ElevatedButton(
onPressed: () {
Navigator.pushNamed(context, 'empDetails');
},
child: Text(
'Back',
style: TextStyle(color: Color(0xFFE26728)),
),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
side: BorderSide(color: Color(0xFFE26728)),
),
),
),
)),
Expanded(
flex: 6,
child: Container(
width: 150,
height: 150,
alignment: Alignment.centerRight,
child: ElevatedButton(
onPressed: () {
Navigator.pushNamed(
context, 'empReviewDetails');
},
child: Text(
'Continue',
style: TextStyle(color: Colors.white),
),
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFFE26728),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
),
),
),
)),
],
),
),
),
],
),
),
),
);
}
}

View File

@ -20,20 +20,36 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
children: [ children: [
// Logo Column // Logo Column
Expanded( Expanded(
flex: 4, flex: 3,
child: Container( child: Row(
mainAxisAlignment: MainAxisAlignment
.spaceEvenly, // Adjust the alignment as needed
children: [
Container(
margin: EdgeInsets.only(top: 10, bottom: 10), margin: EdgeInsets.only(top: 10, bottom: 10),
width: 150, width: 230,
height: 150, height: 230,
child: Image.asset( child: Image.asset(
'assets/navbarLogo.png', 'assets/Group_3.png',
fit: BoxFit.contain, // Adjust the fit as needed fit: BoxFit.contain, // Adjust the fit as needed
), ),
), ),
// SizedBox(width: 0), // Adjust the space between the images
// Container(
// margin: EdgeInsets.only(top: 10, bottom: 10),
// width: 150,
// height: 150,
// child: Image.asset(
// 'assets/partnerLogo.png',
// fit: BoxFit.contain, // Adjust the fit as needed
// ),
// ),
],
),
), ),
// AdaptiveNavBar Column // AdaptiveNavBar Column
Expanded( Expanded(
flex: 8, flex: 9,
child: AdaptiveNavBar( child: AdaptiveNavBar(
screenWidth: sw, screenWidth: sw,
backgroundColor: Color(0xFF00989E), backgroundColor: Color(0xFF00989E),

765
lib/empDetails.dart Normal file
View File

@ -0,0 +1,765 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'customAppBar/customAppBar.dart';
class empDetails extends StatefulWidget {
const empDetails({Key? key}) : super(key: key);
@override
State<empDetails> createState() => _empDetailsState();
}
class _empDetailsState extends State<empDetails> {
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(),
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.symmetric(
horizontal: MediaQuery.of(context).size.width *
0.1, // 30% of screen width as horizontal padding
vertical: MediaQuery.of(context).size.height *
0.03, // 5% of screen height as vertical padding
),
color: Color(0xFFEFF3F6),
child: Column(
children: [
Card(
elevation: 0,
child: Container(
width: double.infinity,
height: 75,
padding: EdgeInsets.only(
top: 20,
bottom: 20,
left: 30,
right: 30), // Add padding to the container
child: Row(
children: [
Expanded(
flex: 6,
child: Container(
width: 150,
height: 150,
alignment: Alignment.centerLeft,
child: Image.asset(
'assets/Group.png',
width: 80, // Set the width of the image
height: 80, // Set the height of the image
fit: BoxFit.contain, // Adjust the fit as needed
),
)),
Expanded(
flex: 6,
child: Text(
'Bharti Airtel',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
)
],
),
),
),
SizedBox(height: 16),
Card(
elevation: 0,
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Color(
0xFFFFF1DD), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Plan Name',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
Text(
'Group Personal Accident Coverage',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'Floater Sum Insured',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 18,
),
),
Text(
'₹ 3,00,000',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
],
),
),
SizedBox(height: 10),
Container(
padding: EdgeInsets.only(
top: 0, bottom: 0, left: 10, right: 10),
child: Text(
'This is a floater sum insured. A floater is a type ot sum insured that provides coverage to more than one member ot a tamily at the same time. Simply put, its a single insurance cover tor the entire family.',
style: TextStyle(
fontSize: 14,
color: Color(0xFF727272),
)),
),
SizedBox(height: 15),
Container(
decoration: BoxDecoration(
color: Color(
0xFFF9F9FB), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 12,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Please Note',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
Text(
'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
decoration: BoxDecoration(
border: Border.all(
color: Color(0xFF000000), // Set border color
width: 1, // Set border width
),
// Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.all(
10), // Padding around the icon
decoration: BoxDecoration(
color: Color(
0xFF00989E), // Background color of the icon container
borderRadius: BorderRadius.circular(
5), // Radius of the container
),
child: Icon(
Icons.account_circle, // Icon data
color: Colors.white,
size: 32, // Color of the icon
),
),
],
))),
Expanded(
flex: 9,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Employee',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
Text(
'Self • 6565656565 • 22/10/1997',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
],
))),
Expanded(
flex: 2,
child: Container(
alignment: Alignment.topRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'View',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 16,
color: Color(0xFFE26728),
),
),
],
))),
],
),
),
],
),
)),
SizedBox(height: 16),
Card(
elevation: 0,
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Color(
0xFFFFF1DD), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Plan Name',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
Text(
'Group Medical Coverage',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'Floater Sum Insured',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 18,
),
),
Text(
'₹ 3,00,000',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
],
),
),
SizedBox(height: 10),
Container(
padding: EdgeInsets.only(
top: 0, bottom: 0, left: 10, right: 10),
child: Text(
'This is a floater sum insured. A floater is a type ot sum insured that provides coverage to more than one member ot a tamily at the same time. Simply put, its a single insurance cover tor the entire family.',
style: TextStyle(
fontSize: 14,
color: Color(0xFF727272),
)),
),
SizedBox(height: 15),
Container(
decoration: BoxDecoration(
color: Color(
0xFFF9F9FB), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 12,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Please Note',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
Text(
'Can add Employee + Spouse + 2 dependent children',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
padding: EdgeInsets.only(
top: 0, bottom: 0, left: 15, right: 15),
child: Text('Please review your enrolled dependents.',
style: TextStyle(
fontSize: 18,
color: Color(0xFF727272),
fontWeight: FontWeight.w500,
)),
),
SizedBox(height: 15),
Container(
decoration: BoxDecoration(
border: Border.all(
color: Color(0xFF000000), // Set border color
width: 1, // Set border width
),
// Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.all(
10), // Padding around the icon
decoration: BoxDecoration(
color: Color(
0xFF00989E), // Background color of the icon container
borderRadius: BorderRadius.circular(
5), // Radius of the container
),
child: Icon(
Icons.account_circle, // Icon data
color: Colors.white,
size: 32, // Color of the icon
),
),
],
))),
Expanded(
flex: 9,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Employee',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
Text(
'Self • DOB - 22/10/1997',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
],
))),
Expanded(
flex: 2,
child: Container(
alignment: Alignment.topRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'View',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 16,
color: Color(0xFFE26728),
),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
decoration: BoxDecoration(
border: Border.all(
color: Color(0xFF000000), // Set border color
width: 1, // Set border width
),
// Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.all(
10), // Padding around the icon
decoration: BoxDecoration(
color: Color(
0xFF00989E), // Background color of the icon container
borderRadius: BorderRadius.circular(
5), // Radius of the container
),
child: Icon(
Icons.account_circle, // Icon data
color: Colors.white,
size: 32, // Color of the icon
),
),
],
))),
Expanded(
flex: 8,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Spouse Name',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
Text(
'Spouse • DOB - 22/10/1999',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
],
))),
Expanded(
flex: 1,
child: Container(
alignment: Alignment.topRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'Delete',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 16,
color: Color(0xFFE26728),
),
),
],
))),
Expanded(
flex: 1,
child: Container(
alignment: Alignment.topRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'View',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 16,
color: Color(0xFFE26728),
),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
decoration: BoxDecoration(
border: Border.all(
color: Color(0xFF000000), // Set border color
width: 1, // Set border width
),
// Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Container(
alignment: Alignment.center,
child: Column(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.all(
5), // Padding around the icon
decoration: BoxDecoration(
color: Color(
0xFF6A6A6A), // Background color of the icon container
borderRadius: BorderRadius.circular(
5), // Radius of the container
),
child: Icon(
Icons.person_add, // Icon data
color: Colors.white,
size: 20, // Color of the icon
),
),
],
))),
Expanded(
flex: 11,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Add Child',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.w500,
),
),
],
))),
],
),
),
],
),
)),
SizedBox(height: 16),
Card(
elevation: 0,
child: Container(
width: double.infinity,
height: 75,
padding: EdgeInsets.only(
top: 20,
bottom: 20,
left: 30,
right: 30), // Add padding to the container
child: Row(
children: [
Expanded(
flex: 12,
child: Container(
width: 150,
height: 150,
alignment: Alignment.centerRight,
child: ElevatedButton(
onPressed: () {
Navigator.pushNamed(context, 'addOnsDetails');
},
child: Text(
'Continue',
style: TextStyle(color: Colors.white),
),
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFFE26728),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
),
),
),
)),
],
),
),
),
],
),
),
),
);
}
}

906
lib/empReview.dart Normal file
View File

@ -0,0 +1,906 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'customAppBar/customAppBar.dart';
class empReviewDetails extends StatefulWidget {
const empReviewDetails({Key? key}) : super(key: key);
@override
State<empReviewDetails> createState() => _empReviewDetailsState();
}
class _empReviewDetailsState extends State<empReviewDetails> {
bool isChecked = false; // Declare the _isSwitched variable here
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CustomAppBar(),
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.symmetric(
horizontal: MediaQuery.of(context).size.width *
0.1, // 30% of screen width as horizontal padding
vertical: MediaQuery.of(context).size.height *
0.03, // 5% of screen height as vertical padding
),
color: Color(0xFFEFF3F6),
child: Column(
children: [
Card(
elevation: 0,
child: Container(
width: double.infinity,
height: 75,
padding: EdgeInsets.only(
top: 20,
bottom: 20,
left: 30,
right: 30), // Add padding to the container
child: Row(
children: [
Expanded(
flex: 6,
child: Container(
width: 150,
height: 150,
alignment: Alignment.centerLeft,
child: Image.asset(
'assets/Group.png',
width: 80, // Set the width of the image
height: 80, // Set the height of the image
fit: BoxFit.contain, // Adjust the fit as needed
),
)),
Expanded(
flex: 6,
child: Text(
'Bharti Airtel',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
)
],
),
),
),
SizedBox(height: 16),
Card(
elevation: 0,
child: Container(
width: double.infinity,
padding: EdgeInsets.only(
top: 20,
bottom: 20,
left: 30,
right: 30), // Add padding to the container
child: Column(children: [
Row(
children: [
Expanded(
flex: 12,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Review',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
color: Color(0xFF181818),
fontWeight: FontWeight.w600,
),
),
],
))),
],
),
Row(
children: [
Expanded(
flex: 2,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Total Payable',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
color: Color(0xFF181818),
),
),
],
))),
Expanded(
flex: 10,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'₹6016.82/Year ',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 22,
color: Color(0xFFE26728),
fontWeight: FontWeight.w500,
),
),
],
))),
],
),
])),
),
SizedBox(height: 16),
Card(
elevation: 0,
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Color(
0xFFFFF1DD), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Plan Name',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
Text(
'Group Personal Accident Coverage',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'Floater Sum Insured',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 18,
),
),
Text(
'₹ 3,00,000',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
padding: EdgeInsets.only(
top: 0, bottom: 0, left: 15, right: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: 10), // Space between icon and text
Expanded(
child: Text(
'Employee Name • Self • DOB - 22/10/1997',
style: TextStyle(
fontSize: 18,
color: Color(0xFF232526),
),
),
),
],
),
],
),
),
],
),
)),
SizedBox(height: 16),
Card(
elevation: 0,
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: [
Container(
decoration: BoxDecoration(
color: Color(
0xFFFFF1DD), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Plan Name',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
Text(
'Group Medical Coverage',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'Floater Sum Insured',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 18,
),
),
Text(
'₹ 3,00,000',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
padding: EdgeInsets.only(
top: 0, bottom: 0, left: 15, right: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: 10), // Space between icon and text
Expanded(
child: Text(
'Employee Name • Self • DOB - 22/10/1997',
style: TextStyle(
fontSize: 18,
color: Color(0xFF232526),
),
),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: 10), // Space between icon and text
Expanded(
child: Text(
'Spouse Name • Spouse • DOB - 22/10/1997',
style: TextStyle(
fontSize: 18,
color: Color(0xFF232526),
),
),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: 10), // Space between icon and text
Expanded(
child: Text(
'Sons Name • Son • DOB - 22/10/1997',
style: TextStyle(
fontSize: 18,
color: Color(0xFF232526),
),
),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: 10), // Space between icon and text
Expanded(
child: Text(
'Daughters Name • Daughter • DOB - 22/10/1997',
style: TextStyle(
fontSize: 18,
color: Color(0xFF232526),
),
),
),
],
),
],
),
),
],
),
)),
SizedBox(height: 16),
Card(
elevation: 0,
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: [
Container(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 12,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Add Ons',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
color: Color(0xFF181818),
fontWeight: FontWeight.w600,
),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
decoration: BoxDecoration(
color: Color(
0xFFFFF1DD), // Set background color for the container
borderRadius: BorderRadius.circular(
5), // Set border radius for the container
),
padding: EdgeInsets.only(
top: 15, bottom: 15, left: 25, right: 25),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Addon Name',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 18,
),
),
Text(
'Group Medical Coverage - Add Parents',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'Floater Sum Insured',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 18,
),
),
Text(
'₹ 3,00,000',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
padding: EdgeInsets.only(
top: 0, bottom: 0, left: 15, right: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: 10), // Space between icon and text
Expanded(
child: Text(
'Fathers Name • Father • DOB - 19/08/1948',
style: TextStyle(
fontSize: 18,
color: Color(0xFF232526),
),
),
),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(Icons.arrow_right,
color: Color(0xFFE26728)), // Arrow icon
SizedBox(
width: 10), // Space between icon and text
Expanded(
child: Text(
'Mothers Name • Mother • DOB - 19/08/1950',
style: TextStyle(
fontSize: 18,
color: Color(0xFF232526),
),
),
),
],
),
],
),
),
],
),
)),
SizedBox(height: 16),
Card(
elevation: 0,
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: [
Container(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 12,
child: Container(
alignment: Alignment
.centerLeft, // Adjust padding as needed
child: Table(
columnWidths: {
0: FlexColumnWidth(
2), // Adjust column width as needed
1: FlexColumnWidth(2),
},
children: [
TableRow(
children: [
TableCell(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'Premium Summary',
textAlign: TextAlign.start,
style: TextStyle(
fontWeight:
FontWeight.bold),
),
),
),
TableCell(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'Additional Premium',
textAlign: TextAlign.start,
style: TextStyle(
fontWeight:
FontWeight.bold),
),
),
),
TableCell(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'GST',
textAlign: TextAlign.start,
style: TextStyle(
fontWeight:
FontWeight.bold),
),
),
),
TableCell(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'Total',
textAlign: TextAlign.start,
style: TextStyle(
fontWeight:
FontWeight.bold),
),
),
),
],
),
TableRow(
children: [
TableCell(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'Group Medical Coverage - Top Up',
textAlign: TextAlign.start,
),
),
),
TableCell(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'₹2000/Year',
textAlign: TextAlign.end,
),
),
),
TableCell(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'₹360/-',
textAlign: TextAlign.end,
),
),
),
TableCell(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'₹2360/Year',
textAlign: TextAlign.end,
),
),
),
],
),
TableRow(
children: [
TableCell(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'Group Medical Coverage - Top Up',
textAlign: TextAlign.start,
),
),
),
TableCell(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'₹2000/Year',
textAlign: TextAlign.end,
),
),
),
TableCell(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'₹360/-',
textAlign: TextAlign.end,
),
),
),
TableCell(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Text(
'₹2360/Year',
textAlign: TextAlign.end,
),
),
),
],
),
],
),
))
],
),
),
SizedBox(height: 10),
Container(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Total Payable',
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
color: Color(0xFF181818),
fontWeight: FontWeight.w600,
),
),
],
))),
Expanded(
flex: 6,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'₹6016.82/Year',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 18,
color: Color(0xFFE26728),
fontWeight: FontWeight.w500,
),
),
],
)))
],
),
),
SizedBox(height: 15),
Container(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 11,
child: Container(
alignment: Alignment.centerRight,
child: Column(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Text(
'I declare that the information I have provided is true and accurate to the best of my knowledge',
textAlign: TextAlign.right,
style: TextStyle(
fontSize: 18,
color: Color(0xFF292929),
),
),
],
))),
Expanded(
flex: 1,
child: Container(
alignment: Alignment.centerLeft,
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Checkbox(
value: isChecked,
onChanged: (bool? value) {
setState(() {
isChecked = value!;
});
},
activeColor: Color(0xFFE26728),
),
],
))),
],
),
),
SizedBox(height: 15),
Container(
child: Row(
children: [
Expanded(
flex: 6,
child: Container(
width: 150,
height: 150,
alignment: Alignment.centerLeft,
child: ElevatedButton(
onPressed: () {
Navigator.pushNamed(
context, 'addOnsDetails');
},
child: Text(
'Back',
style:
TextStyle(color: Color(0xFFE26728)),
),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(5),
side: BorderSide(
color: Color(0xFFE26728)),
),
),
),
)),
Expanded(
flex: 6,
child: Container(
width: 150,
height: 150,
alignment: Alignment.centerRight,
child: ElevatedButton(
onPressed: () {},
child: Text(
'Submit',
style: TextStyle(color: Colors.white),
),
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFFE26728),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(5),
),
),
),
)),
],
),
),
],
),
)),
],
),
),
),
);
}
}

View File

@ -34,6 +34,10 @@ class _excelVerifyState extends State<excelVerify> {
dynamic columnIndexMismatchCount = 0; dynamic columnIndexMismatchCount = 0;
dynamic columnMissingCount = 0; dynamic columnMissingCount = 0;
List<Map<String, dynamic>> extractedData = []; List<Map<String, dynamic>> extractedData = [];
dynamic policyName;
dynamic policyFirstPart;
List<Map<String, dynamic>> originalData = []; // Original data source
List<Map<String, dynamic>> filteredData = []; // Filtered data source
@override @override
void initState() { void initState() {
@ -114,14 +118,16 @@ class _excelVerifyState extends State<excelVerify> {
reader.readAsArrayBuffer(file); reader.readAsArrayBuffer(file);
reader.onLoadEnd.listen((event) async { reader.onLoadEnd.listen((event) async {
Uint8List? fileBytes = reader.result as Uint8List?; Uint8List? fileBytes = reader.result as Uint8List?;
Uint8List? fileBytes2 = reader.result as Uint8List?;
if (fileBytes != null) { if (fileBytes != null) {
// Call function to process Excel data // Call function to process Excel data
setState(() { setState(() {
fileName = file.name; fileName = file.name;
}); });
// Save fileBytes to local storage
final jsonString = json.encode(fileBytes);
html.window.localStorage['fileBytes'] = jsonString;
print(fileName); print(fileName);
print(fileBytes);
_processExcelData(fileBytes); _processExcelData(fileBytes);
} }
}); });
@ -141,7 +147,7 @@ class _excelVerifyState extends State<excelVerify> {
if (dataArray[0].length == 10) { if (dataArray[0].length == 10) {
for (int i = 0; i < dataArray.length; i++) { for (int i = 0; i < dataArray.length; i++) {
Map<String, dynamic> dataMap = { Map<String, dynamic> dataMap = {
"SNo": dataArray[i][0].value, "S.No": dataArray[i][0].value,
"Emp Code": dataArray[i][1].value, "Emp Code": dataArray[i][1].value,
"Name": dataArray[i][2].value, "Name": dataArray[i][2].value,
"DOJ": dataArray[i][3].value, "DOJ": dataArray[i][3].value,
@ -161,8 +167,9 @@ class _excelVerifyState extends State<excelVerify> {
} }
} }
// Do something with extracted data (e.g., display in UI) // Do something with extracted data (e.g., display in UI)
originalData = extractedData;
print(extractedData); filteredData = List.from(originalData);
print(filteredData);
print(validationArray); print(validationArray);
validationArray[0].forEach((key, value) { validationArray[0].forEach((key, value) {
@ -222,13 +229,48 @@ class _excelVerifyState extends State<excelVerify> {
return dataArray; return dataArray;
} }
Future<void> sendExcelFIleTOAPI() async { void _dragAndDropFile(html.File file) async {
print('_processExcelData'); print('file');
print(fileBytes2); print(file);
// Prepare form data
final formData = html.FormData();
formData.appendBlob('file', file);
// Send formData to API endpoint
final response = await html.HttpRequest.request(
'your_api_endpoint_here',
method: 'POST',
sendData: formData,
);
// Handle response as needed
print(response.responseText);
}
void _retrieveAndUploadFile() {
final jsonString = html.window.localStorage['fileBytes'];
if (jsonString != null) {
final decodedBytes = json.decode(jsonString);
if (decodedBytes is List<dynamic>) {
setState(() {
fileName = 'Retrieved File'; // Provide a default name
});
sendExcelFIleTOAPI(
Uint8List.fromList(decodedBytes.cast<int>()), fileName!);
}
}
}
Future<void> sendExcelFIleTOAPI(Uint8List fileBytes, String fileName) async {
print('submit');
print(fileBytes);
if (fileBytes == null) { if (fileBytes == null) {
print('return'); print('return');
return; // No file selected return; // No file selected
} }
// // Prepare form data
// final formData = html.FormData();
// formData.appendBlob('file', html.Blob([fileBytes]), fileName);
// URL of the API where you want to send the file // URL of the API where you want to send the file
final apiUrl = Environment.apiUrl + 'employeeUpload'; final apiUrl = Environment.apiUrl + 'employeeUpload';
@ -239,10 +281,14 @@ class _excelVerifyState extends State<excelVerify> {
// Attach the file to the request // Attach the file to the request
// Set authorization token in headers // Set authorization token in headers
request.headers['Authorization'] = 'Bearer $_token'; request.headers['Authorization'] = 'Bearer $_token';
request.files.add(http.MultipartFile.fromBytes('file', fileBytes!, request.files.add(http.MultipartFile.fromBytes('file', fileBytes,
filename: fileName)); // Specify filename here filename: fileName)); // Specify filename here
request.fields['client_id'] = clintID; request.fields['client_id'] = clintID;
if (policyFirstPart == 'GPA') {
request.fields['policy_id'] = '1'; request.fields['policy_id'] = '1';
} else {
request.fields['policy_id'] = '3';
}
// Send the request // Send the request
final response = await request.send(); final response = await request.send();
@ -259,11 +305,46 @@ class _excelVerifyState extends State<excelVerify> {
} }
} }
void search(String query) {
setState(() {
if (query.isEmpty) {
// If search query is empty, show all data
filteredData = List.from(originalData);
} else {
// Filter the data based on the search query
filteredData = originalData.where((item) {
// Implement your filter logic here, for example:
return item['emp_code'].toLowerCase().contains(query.toLowerCase());
}).toList();
}
});
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// Retrieve the passed argument
dynamic importPolicyName =
ModalRoute.of(context)!.settings.arguments as String?;
List<String> parts = importPolicyName.split(" - ");
policyFirstPart =
parts.isNotEmpty ? parts[0] : ''; // Accessing the first element
print(policyFirstPart); // Output: GMC
print(importPolicyName);
return Scaffold( return Scaffold(
appBar: CustomAppBar(), appBar: CustomAppBar(),
body: Container( body: SafeArea(
child: Theme(
data: ThemeData(
canvasColor: Color(0xFFF4F7FE),
colorScheme: Theme.of(context).colorScheme.copyWith(
primary: Color(0xFFE26728),
background: Colors.red,
secondary: Color(0xFFE26728),
),
),
child: Container(
padding: const EdgeInsets.all(20), padding: const EdgeInsets.all(20),
color: Color(0xFFEFF3F6), color: Color(0xFFEFF3F6),
child: Card( child: Card(
@ -274,6 +355,71 @@ class _excelVerifyState extends State<excelVerify> {
child: Stepper( child: Stepper(
type: StepperType.horizontal, type: StepperType.horizontal,
currentStep: _currentStep, currentStep: _currentStep,
controlsBuilder:
(BuildContext context, ControlsDetails controls) {
return Positioned(
bottom: 0,
right: 0,
left: 0,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
if (_currentStep != 0)
ElevatedButton(
onPressed: controls.onStepCancel,
child: Text(
'Cancel',
style:
TextStyle(color: Color(0xFFE26728)),
),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
side: BorderSide(
color: Color(0xFFE26728)),
),
),
),
SizedBox(width: 10),
if (_currentStep != 2)
ElevatedButton(
onPressed: controls.onStepContinue,
child: const Text(
'NEXT',
style: TextStyle(color: Colors.white),
),
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFFE26728),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
),
),
),
SizedBox(width: 10),
if (_currentStep == 2)
ElevatedButton(
onPressed: () {
_retrieveAndUploadFile();
},
child: Text(
'Submit',
style: TextStyle(color: Colors.white),
),
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFFE26728),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
),
),
),
],
),
),
);
},
onStepContinue: _currentStep == 2 onStepContinue: _currentStep == 2
? null ? null
: () { : () {
@ -323,62 +469,109 @@ class _excelVerifyState extends State<excelVerify> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
flex: 6, flex: 12,
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Expanded(
child: Text(
importPolicyName ?? '',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight
.w600, // Adjust the font size as needed
color: Color(
0xFF181818), // Adjust the text color as needed
),
),
)
],
),
SizedBox(height: 20),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Expanded(
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 10), margin: EdgeInsets.symmetric(
horizontal: 150),
alignment: Alignment.center, alignment: Alignment.center,
color: Colors.grey[200], color: Colors.grey[200],
height: 300, // Adjust height as needed height:
250, // Adjust height as needed
child: DragTarget(
onAccept:
(html.File droppedFile) {
setState(() {
fileName = droppedFile.name;
});
_dragAndDropFile(droppedFile);
},
builder: (BuildContext context,
List<String?> candidateData,
List<dynamic>
rejectedData) {
return Container(
alignment: Alignment.center,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment:
MainAxisAlignment
.center,
children: [ children: [
if (fileName == null)
Text(
'Drop files here to start uploading',
style: TextStyle(
fontSize: 16),
),
SizedBox(height: 20),
if (fileName == null)
Text(
'OR',
style: TextStyle(
fontSize: 16),
), // Add spacing between texts
SizedBox(height: 20),
fileName != null fileName != null
? Text( ? Text(
'File Uploaded: $fileName', 'File Uploaded: $fileName',
style: TextStyle(fontSize: 16), style: TextStyle(
fontSize:
16),
) )
: ElevatedButton( : ElevatedButton(
onPressed: () => onPressed: () =>
_uploadFile('Policy Name'), _uploadFile(
'Policy Name'),
child: Text( child: Text(
'Import', 'Select File',
style: TextStyle( style: TextStyle(
color: Colors.white), color: Colors
.white),
), ),
style: ElevatedButton.styleFrom( style: ElevatedButton
.styleFrom(
backgroundColor: backgroundColor:
Color(0xFFE26728), Color(
0xFFE26728),
), ),
), ),
SizedBox(height: 20), // Add some space // Add more Text widgets for additional lines of text
// Drag and drop widget goes here ],
// Example: DragTarget or Draggable ),
// For example, a DragTarget that accepts Draggable widgets
// if (fileName != null)
// Text(
// 'File Uploaded: $fileName',
// style: TextStyle(fontSize: 16),
// ),
if (fileName == null)
DragTarget(
builder: (BuildContext context,
List<String?> candidateData,
List<dynamic> rejectedData) {
return Container(
width: 200,
height: 200,
alignment: Alignment.center,
color: Colors.blue,
child: Text(
'Drag and drop file to import'),
); );
}, },
onAccept: (data) { ),
// Handle accepted data ),
},
), ),
], ],
), ),
],
), ),
), ),
], ],
@ -409,7 +602,8 @@ class _excelVerifyState extends State<excelVerify> {
'No of column missing - $missingColumnErrorMsg', 'No of column missing - $missingColumnErrorMsg',
iconColor: missingColumnErrorMsg == 0 iconColor: missingColumnErrorMsg == 0
? Colors.green ? Colors.green
: Colors.red, // Set color based on condition : Colors
.red, // Set color based on condition
), ),
if (missingColumnErrorMsg == 0) if (missingColumnErrorMsg == 0)
_buildRowWithIcon( _buildRowWithIcon(
@ -442,6 +636,57 @@ class _excelVerifyState extends State<excelVerify> {
), ),
content: Column( content: Column(
children: [ children: [
Row(
children: [
Expanded(
flex: 10,
child: Container(
alignment: Alignment.centerLeft,
child: Container(
width:
350, // Set your desired width here
height:
40, // Set your desired height here
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Color.fromRGBO(
255,
255,
255,
0.5), // Shadow color with opacity
offset: Offset(5,
5), // Shadow position (horizontal, vertical)
blurRadius: 10, // Blur radius
spreadRadius:
0, // Spread radius
),
],
borderRadius:
BorderRadius.circular(5),
),
child: TextField(
textAlignVertical: TextAlignVertical
.center, // Center the text vertically
decoration: InputDecoration(
hintText: 'Search',
suffixIcon: Icon(Icons.search),
contentPadding: EdgeInsets.all(
10), // Adjust the horizontal padding
border: OutlineInputBorder(
borderSide: BorderSide(
color: Color(
0xFFf5f5f7)), // Set border color to gray
),
),
onChanged:
search, // Call the search method on text change
),
)),
),
],
),
SizedBox(height: 20),
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -458,33 +703,35 @@ class _excelVerifyState extends State<excelVerify> {
], ],
), ),
), ),
SizedBox(height: 20), // SizedBox(height: 20),
if (_currentStep == 2) // if (_currentStep == 2)
Align( // Align(
alignment: Alignment.bottomRight, // alignment: Alignment.bottomRight,
child: ElevatedButton( // child: ElevatedButton(
onPressed: () { // onPressed: () {
sendExcelFIleTOAPI(); // sendExcelFIleTOAPI();
}, // },
child: Text( // child: Text(
'Complete', // 'Complete',
style: TextStyle(color: Colors.white), // style: TextStyle(color: Colors.white),
), // ),
style: ElevatedButton.styleFrom( // style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFFE26728), // backgroundColor: Color(0xFFE26728),
), // ),
), // ),
), // ),
SizedBox(height: 20), // SizedBox(height: 20),
], ],
), ),
), ),
), ),
),
),
); );
} }
Widget _buildDataTable() { Widget _buildDataTable() {
if (extractedData.isEmpty) { if (filteredData.isEmpty) {
SizedBox(height: 25); SizedBox(height: 25);
return Text('No available data'); return Text('No available data');
} else { } else {
@ -504,7 +751,7 @@ class _excelVerifyState extends State<excelVerify> {
DataColumn(label: Text('Mobile No')), DataColumn(label: Text('Mobile No')),
DataColumn(label: Text('SI')), DataColumn(label: Text('SI')),
], ],
source: _DependenceDataSource0(extractedData), source: _DependenceDataSource0(filteredData),
), ),
); );
} }

View File

@ -37,11 +37,15 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
dynamic clintID; dynamic clintID;
late TabController _tabController; late TabController _tabController;
List<dynamic> dataPolicy = []; List<dynamic> dataPolicy = [];
List<Map<String, dynamic>> originalDataGpa = []; // Original data source
List<Map<String, dynamic>> filteredDataGpa = []; // Filtered data source
List<Map<String, dynamic>> originalDataGmc = []; // Original data source
List<Map<String, dynamic>> filteredDataGmc = []; // Filtered data source
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_tabController = TabController(length: 3, vsync: this); _tabController = TabController(length: 2, vsync: this);
_loadToken(); _loadToken();
} }
@ -59,7 +63,7 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
_token = token; _token = token;
}); });
Map<String, dynamic>? decodedToken = Jwt.parseJwt(token); Map<String, dynamic>? decodedToken = Jwt.parseJwt(token);
clintID = decodedToken['client_id'].toString(); clintID = decodedToken['client_id'];
await getPolicyName(clintID); await getPolicyName(clintID);
} else { } else {
_token = 'null'; _token = 'null';
@ -96,16 +100,9 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
getPolicyNo1 = dataPolicy[1]['client_policy_id']; getPolicyNo1 = dataPolicy[1]['client_policy_id'];
print(getPolicyNameDetails1); print(getPolicyNameDetails1);
}); });
const duration = Duration(seconds: 5);
Timer.periodic(duration, (timer) {
// Code to execute periodically every 2 seconds // Code to execute periodically every 2 seconds
getEmployeeAndDependenceGPA(clintID, getPolicyNo0); getEmployeeAndDependenceGPA(clintID, getPolicyNo0);
getEmployeeAndDependenceGMC(clintID, getPolicyNo1); getEmployeeAndDependenceGMC(clintID, getPolicyNo1);
// If you want to stop the periodic execution after some time,
// you can cancel the timer like this:
timer.cancel();
});
} else { } else {
print('API request failed with status: ${data['status']}'); print('API request failed with status: ${data['status']}');
} }
@ -140,6 +137,8 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
setState(() { setState(() {
getEmpDependenceByClintIdGPA = getEmpDependenceByClintIdGPA =
List<Map<String, dynamic>>.from(data['data']); List<Map<String, dynamic>>.from(data['data']);
originalDataGpa = getEmpDependenceByClintIdGPA;
filteredDataGpa = List.from(originalDataGpa);
}); });
} else { } else {
print('API request failed with status: ${data['status']}'); print('API request failed with status: ${data['status']}');
@ -175,6 +174,8 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
setState(() { setState(() {
getEmpDependenceByClintIdGMC = getEmpDependenceByClintIdGMC =
List<Map<String, dynamic>>.from(data['data']); List<Map<String, dynamic>>.from(data['data']);
originalDataGmc = getEmpDependenceByClintIdGMC;
filteredDataGmc = List.from(originalDataGmc);
}); });
} else { } else {
print('API request failed with status: ${data['status']}'); print('API request failed with status: ${data['status']}');
@ -191,113 +192,15 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
} }
} }
// void _GMCImport() async {
// FilePickerResult? result = await FilePicker.platform.pickFiles(
// type: FileType.custom,
// allowedExtensions: ['xlsx', 'xls'], // Allow Excel file extensions
// );
//
// if (result != null) {
// List<int> fileBytes = result.files.single.bytes!;
// String fileName = result.files.single.name;
//
// var request = http.MultipartRequest(
// 'POST',
// Uri.parse(Environment.apiUrl + 'employeeUpload'),
// );
// // Set authorization token in headers
// request.headers['Authorization'] = 'Bearer $_token';
// request.files.add(
// http.MultipartFile.fromBytes(
// 'file',
// fileBytes,
// filename: fileName,
// ),
// );
// request.fields['client_id'] = clintID;
// request.fields['policy_id'] = '3';
//
// var response = await request.send();
//
// if (response.statusCode == 200) {
// ToastHelper.showSuccessToast(context, 'File uploaded successfully');
// print('File uploaded successfully');
//
// // Call your API here after file upload
// await getEmployeeAndDependenceGMC(clintID, getPolicyNo1);
// } else {
// ToastHelper.showErrorToast(
// context, 'Failed to upload file: ${response.reasonPhrase}');
// print('Failed to upload file: ${response.reasonPhrase}');
// }
// }
// }
// void _GPAImport() async {
// FilePickerResult? result = await FilePicker.platform.pickFiles(
// type: FileType.custom,
// allowedExtensions: ['xlsx', 'xls'], // Allow Excel file extensions
// );
//
// if (result != null) {
// List<int> fileBytes = result.files.single.bytes!;
// String fileName = result.files.single.name;
//
// var request = http.MultipartRequest(
// 'POST',
// Uri.parse(Environment.apiUrl + 'employeeUpload'),
// );
// // Set authorization token in headers
// request.headers['Authorization'] = 'Bearer $_token';
// request.files.add(
// http.MultipartFile.fromBytes(
// 'file',
// fileBytes,
// filename: fileName,
// ),
// );
// request.fields['client_id'] = clintID;
// request.fields['policy_id'] = '1';
//
// var response = await request.send();
//
// if (response.statusCode == 200) {
// print('File uploaded successfully');
// ToastHelper.showSuccessToast(context, 'File uploaded successfully');
//
// // Call your API here after file upload
// await getEmployeeAndDependenceGPA(clintID, getPolicyNo0);
// } else {
// ToastHelper.showErrorToast(
// context, 'Failed to upload file: ${response.reasonPhrase}');
// print('Failed to upload file: ${response.reasonPhrase}');
// }
// }
// }
// void _uploadFile(importPolicyName) async {
// if (kIsWeb) {
// print('WEB');
// final input = html.FileUploadInputElement();
// input.accept = '.xlsx,.xls'; // Specify accepted file types here
// input.click();
// input.onChange.listen((event) {
// final file = input.files!.first;
// final reader = html.FileReader();
// reader.readAsArrayBuffer(file);
//
// reader.onLoadEnd.listen((event) {
// setState(() {
// _fileBytes = reader.result as Uint8List?;
// _importFile(importPolicyName);
// });
// });
// });
// }
// }
void _uploadFile(importPolicyName) async { void _uploadFile(importPolicyName) async {
Navigator.pushNamed(context, 'excelVerify'); var argumentDetails;
if (importPolicyName == 'GPA') {
argumentDetails = importPolicyName + ' - ' + getPolicyNameDetails0;
} else {
argumentDetails = importPolicyName + ' - ' + getPolicyNameDetails1;
}
Navigator.pushNamed(context, 'excelVerify', arguments: argumentDetails);
return; return;
if (kIsWeb) { if (kIsWeb) {
final input = html.FileUploadInputElement(); final input = html.FileUploadInputElement();
@ -311,218 +214,41 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
final Uint8List? fileBytes = reader.result as Uint8List?; final Uint8List? fileBytes = reader.result as Uint8List?;
if (fileBytes != null) { if (fileBytes != null) {
// Call function to process Excel data // Call function to process Excel data
_processExcelData(fileBytes);
} }
}); });
}); });
} }
} }
void _processExcelData(Uint8List fileBytes) { void searchGpa(String query) {
// Decode the Excel file and extract relevant data setState(() {
// Assuming dataArray is your array containing Excel data if (query.isEmpty) {
List<List<Data>> dataArray = decodeExcelData(fileBytes); // If search query is empty, show all data
filteredDataGpa = List.from(originalDataGpa);
// Extract Name, Age, and City from the array
List<Map<String, dynamic>> extractedData = [];
for (int i = 1; i < dataArray.length; i++) {
Map<String, dynamic> dataMap = {
"SNo": dataArray[i][0].value,
"EmpCode": dataArray[i][1].value,
"Name": dataArray[i][2].value,
"DOJ": dataArray[i][3].value,
"Gender": dataArray[i][4].value,
"Relation": dataArray[i][5].value,
"DOB": dataArray[i][6].value,
"mail": dataArray[i][7].value,
"mobile": dataArray[i][8].value,
"SI": dataArray[i][9].value,
};
extractedData.add(dataMap);
}
// Do something with extracted data (e.g., display in UI)
print(extractedData);
}
// Placeholder function for decoding Excel data
List<List<Data>> decodeExcelData(Uint8List fileBytes) {
// Implement your logic to decode Excel data here
// This function should return your array containing Excel data
// For example, you can use the excel package to decode the Excel file
// Import the excel package in your pubspec.yaml file:
// dependencies:
// excel: ^1.1.0
// Then use the following code to decode the Excel file:
// Import the necessary packages
// import 'package:excel/excel.dart';
// Create an Excel instance from the fileBytes
final excel = Excel.decodeBytes(fileBytes);
// Assuming there's only one sheet in the Excel file
final sheet = excel.tables.keys.first;
final table = excel.tables[sheet]!;
// Convert Excel table to a List<List<Data>>
// Convert Excel table to a List<List<Data>>
List<List<Data>> dataArray = [];
for (int rowIdx = 0; rowIdx < table.rows.length; rowIdx++) {
List<Data> rowData = [];
for (int colIdx = 0; colIdx < table.rows[rowIdx].length; colIdx++) {
var value = table.rows[rowIdx][colIdx]?.value;
rowData.add(Data(value, rowIdx, colIdx, sheet));
}
dataArray.add(rowData);
}
return dataArray;
}
Future<void> _importFile(importPolicyName) async {
if (_fileBytes == null) {
return; // No file selected
}
// URL of the API where you want to send the file
final apiUrl = Environment.apiUrl + 'employeeUpload';
// Create a multipart request
final request = http.MultipartRequest('POST', Uri.parse(apiUrl));
// Attach the file to the request
// Set authorization token in headers
request.headers['Authorization'] = 'Bearer $_token';
request.files.add(http.MultipartFile.fromBytes('file', _fileBytes!,
filename: 'excel_file.xls')); // Specify filename here
request.fields['client_id'] = clintID;
if (importPolicyName == 'GPA') {
request.fields['policy_id'] = '1';
} else { } else {
request.fields['policy_id'] = '3'; // Filter the data based on the search query
filteredDataGpa = originalDataGpa.where((item) {
// Implement your filter logic here, for example:
return item['emp_code'].toLowerCase().contains(query.toLowerCase());
}).toList();
}
});
} }
// Send the request void searchGmc(String query) {
final response = await request.send(); setState(() {
if (query.isEmpty) {
// Check the status code of the response // If search query is empty, show all data
if (response.statusCode == 200) { filteredDataGmc = List.from(originalDataGmc);
// ToastHelper.showSuccessToast(context, 'File uploaded successfully');
print('File uploaded successfully');
if (importPolicyName == 'GPA') {
await getEmployeeAndDependenceGPA(clintID, getPolicyNo0);
} else { } else {
await getEmployeeAndDependenceGMC(clintID, getPolicyNo1); // Filter the data based on the search query
filteredDataGmc = originalDataGmc.where((item) {
// Implement your filter logic here, for example:
return item['emp_code'].toLowerCase().contains(query.toLowerCase());
}).toList();
} }
print('File uploaded successfully'); });
} else {
// ToastHelper.showSuccessToast(
// context, 'Failed to upload file: ${response.reasonPhrase}');
print('Failed to upload file: ${response.reasonPhrase}');
} }
}
// void _GPAImport() async {
// print('Enter');
//
// if (kIsWeb) {
// print('WEB');
// final input = html.FileUploadInputElement();
// input.accept = '.xlsx,.xls'; // Specify accepted file types here
// input.click();
// print('WEB111');
// input.onChange.listen((event) {
// final file = input.files!.first;
// final reader = html.FileReader();
// reader.readAsArrayBuffer(file);
//
// reader.onLoadEnd.listen((event) {
// setState(() {
// _fileBytes = reader.result as Uint8List?;
// });
// });
// });
// print(_fileBytes);
// if (_fileBytes == null) {
// return; // No file selected
// } else {
// var request = http.MultipartRequest(
// 'POST',
// Uri.parse(Environment.apiUrl + 'employeeUpload'),
// );
//
// // Set authorization token in headers
// request.headers['Authorization'] = 'Bearer $_token';
// request.files.add(
// http.MultipartFile.fromBytes(
// 'file',
// _fileBytes!,
// ),
// );
// request.fields['client_id'] = clintID;
// request.fields['policy_id'] = '1';
//
// var response = await request.send();
//
// if (response.statusCode == 200) {
// print('File uploaded successfully');
// ToastHelper.showSuccessToast(context, 'File uploaded successfully');
//
// // Call your API here after file upload
// await getEmployeeAndDependenceGPA(clintID, getPolicyNo0);
// } else {
// ToastHelper.showErrorToast(
// context, 'Failed to upload file: ${response.reasonPhrase}');
// print('Failed to upload file: ${response.reasonPhrase}');
// }
// }
// } else {
// print('IOS Android');
// // Use file picker for mobile platforms
// FilePickerResult? result = await FilePicker.platform.pickFiles(
// type: FileType.custom,
// allowedExtensions: ['xlsx', 'xls'], // Allow Excel file extensions
// );
//
// // Rest of your code remains the same
// // Make sure to handle the result based on the platform
// if (result != null) {
// List<int> fileBytes = result.files.single.bytes!;
// String fileName = result.files.single.name;
//
// var request = http.MultipartRequest(
// 'POST',
// Uri.parse(Environment.apiUrl + 'employeeUpload'),
// );
//
// // Set authorization token in headers
// request.headers['Authorization'] = 'Bearer $_token';
// request.files.add(
// http.MultipartFile.fromBytes(
// 'file',
// fileBytes,
// filename: fileName,
// ),
// );
// request.fields['client_id'] = clintID;
// request.fields['policy_id'] = '1';
//
// var response = await request.send();
//
// if (response.statusCode == 200) {
// print('File uploaded successfully');
// ToastHelper.showSuccessToast(context, 'File uploaded successfully');
//
// // Call your API here after file upload
// await getEmployeeAndDependenceGPA(clintID, getPolicyNo0);
// } else {
// ToastHelper.showErrorToast(
// context, 'Failed to upload file: ${response.reasonPhrase}');
// print('Failed to upload file: ${response.reasonPhrase}');
// }
// }
// }
// }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -539,7 +265,7 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
labelColor: Colors.white, // Selected tab color labelColor: Colors.white, // Selected tab color
unselectedLabelColor: Colors.grey, // Unselected tab color unselectedLabelColor: Colors.grey, // Unselected tab color
indicator: BoxDecoration( indicator: BoxDecoration(
color: Colors.red, // Background color of selected tab color: Color(0xFFE26728), // Background color of selected tab
), ),
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
controller: _tabController, controller: _tabController,
@ -549,7 +275,7 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
width: double.maxFinite, width: double.maxFinite,
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 0), padding: EdgeInsets.symmetric(vertical: 0),
child: Text('GPA-' + getPolicyNameDetails0 ?? ''), child: Text('GPA-' + (getPolicyNameDetails0 ?? '')),
), ),
), ),
Tab( Tab(
@ -557,7 +283,7 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
width: double.infinity, width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 0), padding: EdgeInsets.symmetric(vertical: 0),
child: Text('GMC-' + getPolicyNameDetails1 ?? ''), child: Text('GMC-' + (getPolicyNameDetails1 ?? '')),
), ),
), ),
], ],
@ -579,14 +305,49 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
flex: 10, flex: 10,
child: Container( child: Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text( child: Container(
'', width:
style: TextStyle( 350, // Set your desired width here
fontSize: 20, height:
fontWeight: FontWeight.bold, 40, // Set your desired height here
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Color.fromRGBO(
255,
255,
255,
0.5), // Shadow color with opacity
offset: Offset(5,
5), // Shadow position (horizontal, vertical)
blurRadius:
10, // Blur radius
spreadRadius:
0, // Spread radius
),
],
borderRadius:
BorderRadius.circular(5),
),
child: TextField(
textAlignVertical: TextAlignVertical
.center, // Center the text vertically
decoration: InputDecoration(
hintText: 'Search',
suffixIcon:
Icon(Icons.search),
contentPadding: EdgeInsets.all(
10), // Adjust the horizontal padding
border: OutlineInputBorder(
borderSide: BorderSide(
color: Color(
0xFFf5f5f7)), // Set border color to gray
), ),
), ),
onChanged:
searchGpa, // Call the search method on text change
), ),
)),
), ),
Expanded( Expanded(
flex: 2, flex: 2,
@ -594,14 +355,14 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceEvenly, MainAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
child: ElevatedButton( child: ElevatedButton(
onPressed: () => onPressed: () =>
_uploadFile('GPA'), _uploadFile('GPA'),
child: Text( child: Text(
'Import', 'Import Data',
style: TextStyle( style: TextStyle(
color: Colors.white), color: Colors.white),
), ),
@ -609,6 +370,12 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
ElevatedButton.styleFrom( ElevatedButton.styleFrom(
backgroundColor: backgroundColor:
Color(0xFFE26728), Color(0xFFE26728),
shape:
RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(
5),
),
), ),
), ),
), ),
@ -645,14 +412,49 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
flex: 10, flex: 10,
child: Container( child: Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Text( child: Container(
'', width:
style: TextStyle( 350, // Set your desired width here
fontSize: 20, height:
fontWeight: FontWeight.bold, 40, // Set your desired height here
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Color.fromRGBO(
255,
255,
255,
0.5), // Shadow color with opacity
offset: Offset(5,
5), // Shadow position (horizontal, vertical)
blurRadius:
10, // Blur radius
spreadRadius:
0, // Spread radius
),
],
borderRadius:
BorderRadius.circular(5),
),
child: TextField(
textAlignVertical: TextAlignVertical
.center, // Center the text vertically
decoration: InputDecoration(
hintText: 'Search',
suffixIcon:
Icon(Icons.search),
contentPadding: EdgeInsets.all(
10), // Adjust the horizontal padding
border: OutlineInputBorder(
borderSide: BorderSide(
color: Color(
0xFFf5f5f7)), // Set border color to gray
), ),
), ),
onChanged:
searchGmc, // Call the search method on text change
), ),
)),
), ),
Expanded( Expanded(
flex: 2, flex: 2,
@ -675,6 +477,12 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
ElevatedButton.styleFrom( ElevatedButton.styleFrom(
backgroundColor: backgroundColor:
Color(0xFFE26728), Color(0xFFE26728),
shape:
RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(
5),
),
), ),
), ),
) )
@ -709,7 +517,7 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
} }
Widget _buildDataTableGPA() { Widget _buildDataTableGPA() {
if (getEmpDependenceByClintIdGPA.isEmpty) { if (filteredDataGpa.isEmpty) {
SizedBox(height: 25); SizedBox(height: 25);
return Text('No available data'); return Text('No available data');
} else { } else {
@ -725,14 +533,14 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
DataColumn(label: Text('Gender')), DataColumn(label: Text('Gender')),
DataColumn(label: Text('Mobile No')), DataColumn(label: Text('Mobile No')),
], ],
source: _DependenceDataSource0(getEmpDependenceByClintIdGPA), source: _DependenceDataSource0(filteredDataGpa),
), ),
); );
} }
} }
Widget _buildDataTableGMC() { Widget _buildDataTableGMC() {
if (getEmpDependenceByClintIdGPA.isEmpty) { if (filteredDataGmc.isEmpty) {
SizedBox(height: 25); SizedBox(height: 25);
return Text('No available data'); return Text('No available data');
} else { } else {
@ -748,7 +556,7 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
DataColumn(label: Text('Gender')), DataColumn(label: Text('Gender')),
DataColumn(label: Text('Mobile No')), DataColumn(label: Text('Mobile No')),
], ],
source: _DependenceDataSource1(getEmpDependenceByClintIdGMC), source: _DependenceDataSource1(filteredDataGmc),
), ),
); );
} }

View File

@ -161,7 +161,7 @@ class _MyPhoneState extends State<MyHrLogin> {
Row( Row(
children: [ children: [
Expanded( Expanded(
flex: 6, flex: 4,
child: Align( child: Align(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: MouseRegion( child: MouseRegion(
@ -178,13 +178,11 @@ class _MyPhoneState extends State<MyHrLogin> {
children: [ children: [
Icon( Icon(
Icons Icons
.keyboard_backspace, // Icon for customer login .west, // Icon for customer login
color: Colors color: Colors
.black, // Adjust color as needed .black, // Adjust color as needed
), ),
SizedBox( SizedBox(width: 5),
width:
5), // Add some space between icon and text
Text( Text(
'Customer Login', 'Customer Login',
style: TextStyle( style: TextStyle(
@ -199,7 +197,7 @@ class _MyPhoneState extends State<MyHrLogin> {
), ),
)), )),
Expanded( Expanded(
flex: 6, flex: 8,
child: Align( child: Align(
alignment: Alignment alignment: Alignment
.centerRight, // Align to the start .centerRight, // Align to the start
@ -223,10 +221,11 @@ class _MyPhoneState extends State<MyHrLogin> {
)), )),
], ],
), ),
SizedBox( SizedBox(height: 15),
height: Container(
20), // Add some space between rows margin:
Row( EdgeInsets.symmetric(horizontal: 150),
child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
children: [ children: [
@ -239,27 +238,36 @@ class _MyPhoneState extends State<MyHrLogin> {
), ),
], ],
), ),
),
SizedBox( SizedBox(
height: 15, height: 15,
), ),
Row( Container(
margin:
EdgeInsets.symmetric(horizontal: 150),
child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
children: [ children: [
Text( Expanded(
child: Text(
"Have a Health Insurance Policy number, but never signed in? Don't worry, We got you covered", "Have a Health Insurance Policy number, but never signed in? Don't worry, We got you covered",
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: Color(0xFF000000)), color: Color(0xFF000000)),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
)
], ],
), ),
),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
Container( Container(
height: 55, height: 55,
margin:
EdgeInsets.symmetric(horizontal: 150),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
width: 1, color: Colors.grey), width: 1, color: Colors.grey),
@ -325,7 +333,10 @@ class _MyPhoneState extends State<MyHrLogin> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
SizedBox( Container(
margin:
EdgeInsets.symmetric(horizontal: 150),
child: SizedBox(
width: double.infinity, width: double.infinity,
height: 45, height: 45,
child: ElevatedButton( child: ElevatedButton(
@ -344,11 +355,15 @@ class _MyPhoneState extends State<MyHrLogin> {
), ),
), ),
), ),
),
SizedBox( SizedBox(
height: _size.width <= 1100 ? 0 : 0, height: _size.width <= 1100 ? 0 : 0,
), ),
_size.width > 1100 _size.width > 1100
? Column( ? Container(
margin: EdgeInsets.symmetric(
horizontal: 150),
child: Column(
children: [ children: [
SizedBox(height: 30), SizedBox(height: 30),
Text( Text(
@ -360,10 +375,12 @@ class _MyPhoneState extends State<MyHrLogin> {
), ),
SizedBox(height: 15), SizedBox(height: 15),
], ],
) ))
: SizedBox(), : SizedBox(),
_size.width > 1100 _size.width > 1100
? Container( ? Container(
margin: EdgeInsets.symmetric(
horizontal: 150),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,

View File

@ -2,6 +2,9 @@ import 'dart:js';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:nhancepolicy/addons.dart';
import 'package:nhancepolicy/empReview.dart';
import 'package:nhancepolicy/empDetails.dart';
import 'package:nhancepolicy/excel_verification.dart'; import 'package:nhancepolicy/excel_verification.dart';
import 'package:nhancepolicy/hrHome.dart'; import 'package:nhancepolicy/hrHome.dart';
import 'package:nhancepolicy/hrVerify.dart'; import 'package:nhancepolicy/hrVerify.dart';
@ -26,6 +29,9 @@ Future<void> main() async {
'hrVerify': (context) => MyHrVerify(), 'hrVerify': (context) => MyHrVerify(),
'hrHome': (context) => MyHrHome(), 'hrHome': (context) => MyHrHome(),
'excelVerify': (context) => excelVerify(), 'excelVerify': (context) => excelVerify(),
'empDetails': (context) => empDetails(),
'addOnsDetails': (context) => addOnsDetails(),
'empReviewDetails': (context) => empReviewDetails(),
}, },
)); ));
} }

View File

@ -140,7 +140,7 @@ class _MyPhoneState extends State<MyPhone> {
Row( Row(
children: [ children: [
Expanded( Expanded(
flex: 6, flex: 10,
child: Align( child: Align(
alignment: Alignment alignment: Alignment
.centerLeft, // Align to the start .centerLeft, // Align to the start
@ -163,38 +163,48 @@ class _MyPhoneState extends State<MyPhone> {
), ),
)), )),
Expanded( Expanded(
flex: 6, flex: 2,
child: Align( child: Align(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: ElevatedButton( child: MouseRegion(
onPressed: () { cursor:
SystemMouseCursors.click,
child: GestureDetector(
onTap: () {
// Add your navigation logic here
// For example, you can use Navigator.push to navigate to another page
Navigator.pushNamed( Navigator.pushNamed(
context, 'hrLogin'); context, 'hrLogin');
}, },
child: Text( child: Row(
'HR login', children: [
Text(
'HR Login',
style: TextStyle( style: TextStyle(
color: Color(0xFF00989E)),
),
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(
5),
side: BorderSide(
color: Color( color: Color(
0xFF00989E)), // Add border 0xFF000000), // Text color
// Add other text styles as needed
), ),
), ),
SizedBox(width: 5),
Icon(
Icons
.east, // Icon for customer login
color: Colors
.black, // Adjust color as needed
), ),
))
], ],
), ),
SizedBox( ),
height: ),
20), // Add some space between rows )),
Row( ],
),
SizedBox(height: 15),
Container(
margin:
EdgeInsets.symmetric(horizontal: 150),
child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
children: [ children: [
@ -207,27 +217,36 @@ class _MyPhoneState extends State<MyPhone> {
), ),
], ],
), ),
),
SizedBox( SizedBox(
height: 15, height: 15,
), ),
Row( Container(
margin:
EdgeInsets.symmetric(horizontal: 150),
child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,
children: [ children: [
Text( Expanded(
child: Text(
"Have a Health Insurance Policy number, but never signed in? Don't worry, We got you covered", "Have a Health Insurance Policy number, but never signed in? Don't worry, We got you covered",
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
color: Color(0xFF000000)), color: Color(0xFF000000)),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
)
], ],
), ),
),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
Container( Container(
height: 55, height: 55,
margin:
EdgeInsets.symmetric(horizontal: 150),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
width: 1, color: Colors.grey), width: 1, color: Colors.grey),
@ -293,7 +312,10 @@ class _MyPhoneState extends State<MyPhone> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
SizedBox( Container(
margin:
EdgeInsets.symmetric(horizontal: 150),
child: SizedBox(
width: double.infinity, width: double.infinity,
height: 45, height: 45,
child: ElevatedButton( child: ElevatedButton(
@ -312,11 +334,15 @@ class _MyPhoneState extends State<MyPhone> {
), ),
), ),
), ),
),
SizedBox( SizedBox(
height: _size.width <= 1100 ? 0 : 0, height: _size.width <= 1100 ? 0 : 0,
), ),
_size.width > 1100 _size.width > 1100
? Column( ? Container(
margin: EdgeInsets.symmetric(
horizontal: 150),
child: Column(
children: [ children: [
SizedBox(height: 30), SizedBox(height: 30),
Text( Text(
@ -328,10 +354,12 @@ class _MyPhoneState extends State<MyPhone> {
), ),
SizedBox(height: 15), SizedBox(height: 15),
], ],
) ))
: SizedBox(), : SizedBox(),
_size.width > 1100 _size.width > 1100
? Container( ? Container(
margin: EdgeInsets.symmetric(
horizontal: 150),
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.center, MainAxisAlignment.center,

View File

@ -111,7 +111,7 @@ class _MyVerifyState extends State<MyVerify> {
// ToastHelper.showSuccessToast(context, 'Successfully Login'); // ToastHelper.showSuccessToast(context, 'Successfully Login');
print('Successfully Login'); print('Successfully Login');
// Redirect to another page // Redirect to another page
Navigator.pushNamed(context, 'home'); Navigator.pushNamed(context, 'empDetails');
} else { } else {
// Show a Snackbar if the OTP is invalid // Show a Snackbar if the OTP is invalid
// ToastHelper.showErrorToast(context, 'Invalid OTP. Please try again'); // ToastHelper.showErrorToast(context, 'Invalid OTP. Please try again');