employee new flow design done
This commit is contained in:
parent
89bcd6e3d6
commit
d78c46be9d
BIN
assets/Group.png
Normal file
BIN
assets/Group.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
assets/Group_3.png
Normal file
BIN
assets/Group_3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
BIN
assets/Vector.png
Normal file
BIN
assets/Vector.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 840 B |
BIN
assets/partnerLogo.png
Normal file
BIN
assets/partnerLogo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
974
lib/addons.dart
Normal file
974
lib/addons.dart
Normal 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),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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(
|
||||||
margin: EdgeInsets.only(top: 10, bottom: 10),
|
mainAxisAlignment: MainAxisAlignment
|
||||||
width: 150,
|
.spaceEvenly, // Adjust the alignment as needed
|
||||||
height: 150,
|
children: [
|
||||||
child: Image.asset(
|
Container(
|
||||||
'assets/navbarLogo.png',
|
margin: EdgeInsets.only(top: 10, bottom: 10),
|
||||||
fit: BoxFit.contain, // Adjust the fit as needed
|
width: 230,
|
||||||
),
|
height: 230,
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/Group_3.png',
|
||||||
|
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
765
lib/empDetails.dart
Normal 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
906
lib/empReview.dart
Normal 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),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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,8 +147,8 @@ 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,
|
||||||
"EmpCode": 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,
|
||||||
"Gender": dataArray[i][4].value,
|
"Gender": dataArray[i][4].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;
|
||||||
request.fields['policy_id'] = '1';
|
if (policyFirstPart == 'GPA') {
|
||||||
|
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,224 +305,425 @@ 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(
|
||||||
padding: const EdgeInsets.all(20),
|
child: Theme(
|
||||||
color: Color(0xFFEFF3F6),
|
data: ThemeData(
|
||||||
child: Card(
|
canvasColor: Color(0xFFF4F7FE),
|
||||||
elevation: 0,
|
colorScheme: Theme.of(context).colorScheme.copyWith(
|
||||||
child: Column(
|
primary: Color(0xFFE26728),
|
||||||
children: [
|
background: Colors.red,
|
||||||
Expanded(
|
secondary: Color(0xFFE26728),
|
||||||
child: Stepper(
|
),
|
||||||
type: StepperType.horizontal,
|
),
|
||||||
currentStep: _currentStep,
|
child: Container(
|
||||||
onStepContinue: _currentStep == 2
|
padding: const EdgeInsets.all(20),
|
||||||
? null
|
color: Color(0xFFEFF3F6),
|
||||||
: () {
|
child: Card(
|
||||||
if (_currentStep == 0) {
|
elevation: 0,
|
||||||
// For the first step, allow continue if fileName is not null
|
child: Column(
|
||||||
if (fileName != null) {
|
children: [
|
||||||
setState(() {
|
Expanded(
|
||||||
_currentStep += 1;
|
child: Stepper(
|
||||||
});
|
type: StepperType.horizontal,
|
||||||
}
|
currentStep: _currentStep,
|
||||||
} else if (_currentStep == 1) {
|
controlsBuilder:
|
||||||
// For the second step, allow continue if both errors are 0
|
(BuildContext context, ControlsDetails controls) {
|
||||||
if (missingColumnErrorMsg == 0 &&
|
return Positioned(
|
||||||
columnIndexMismatchCount == 0) {
|
bottom: 0,
|
||||||
setState(() {
|
right: 0,
|
||||||
_currentStep += 1;
|
left: 0,
|
||||||
});
|
child: Padding(
|
||||||
}
|
padding: const EdgeInsets.all(16.0),
|
||||||
}
|
child: Row(
|
||||||
// setState(() {
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
// // Increment the current step when the user clicks continue
|
children: <Widget>[
|
||||||
// if (_currentStep < 2) {
|
if (_currentStep != 0)
|
||||||
// _currentStep += 1;
|
ElevatedButton(
|
||||||
// }
|
onPressed: controls.onStepCancel,
|
||||||
// });
|
child: Text(
|
||||||
},
|
'Cancel',
|
||||||
onStepCancel: () {
|
style:
|
||||||
setState(() {
|
TextStyle(color: Color(0xFFE26728)),
|
||||||
// Decrement the current step when the user clicks cancel
|
),
|
||||||
if (_currentStep > 0) {
|
style: ElevatedButton.styleFrom(
|
||||||
_currentStep -= 1;
|
backgroundColor: Colors.white,
|
||||||
}
|
shape: RoundedRectangleBorder(
|
||||||
});
|
borderRadius: BorderRadius.circular(5),
|
||||||
},
|
side: BorderSide(
|
||||||
steps: [
|
color: Color(0xFFE26728)),
|
||||||
Step(
|
),
|
||||||
title: Container(
|
),
|
||||||
child: Text(
|
),
|
||||||
'Import Excel',
|
SizedBox(width: 10),
|
||||||
style: TextStyle(
|
if (_currentStep != 2)
|
||||||
color: Color(0xFFE26728),
|
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),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
),
|
},
|
||||||
content: Container(
|
onStepContinue: _currentStep == 2
|
||||||
child: Row(
|
? null
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
: () {
|
||||||
children: [
|
if (_currentStep == 0) {
|
||||||
Expanded(
|
// For the first step, allow continue if fileName is not null
|
||||||
flex: 6,
|
if (fileName != null) {
|
||||||
child: Container(
|
setState(() {
|
||||||
margin: EdgeInsets.symmetric(horizontal: 10),
|
_currentStep += 1;
|
||||||
alignment: Alignment.center,
|
});
|
||||||
color: Colors.grey[200],
|
}
|
||||||
height: 300, // Adjust height as needed
|
} else if (_currentStep == 1) {
|
||||||
child: Column(
|
// For the second step, allow continue if both errors are 0
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
if (missingColumnErrorMsg == 0 &&
|
||||||
children: [
|
columnIndexMismatchCount == 0) {
|
||||||
fileName != null
|
setState(() {
|
||||||
? Text(
|
_currentStep += 1;
|
||||||
'File Uploaded: $fileName',
|
});
|
||||||
style: TextStyle(fontSize: 16),
|
}
|
||||||
)
|
}
|
||||||
: ElevatedButton(
|
// setState(() {
|
||||||
onPressed: () =>
|
// // Increment the current step when the user clicks continue
|
||||||
_uploadFile('Policy Name'),
|
// if (_currentStep < 2) {
|
||||||
|
// _currentStep += 1;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
onStepCancel: () {
|
||||||
|
setState(() {
|
||||||
|
// Decrement the current step when the user clicks cancel
|
||||||
|
if (_currentStep > 0) {
|
||||||
|
_currentStep -= 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
steps: [
|
||||||
|
Step(
|
||||||
|
title: Container(
|
||||||
|
child: Text(
|
||||||
|
'Import Excel',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFFE26728),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
content: Container(
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
flex: 12,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'Import',
|
importPolicyName ?? '',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white),
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight
|
||||||
|
.w600, // Adjust the font size as needed
|
||||||
|
color: Color(
|
||||||
|
0xFF181818), // Adjust the text color as needed
|
||||||
|
),
|
||||||
),
|
),
|
||||||
style: ElevatedButton.styleFrom(
|
)
|
||||||
backgroundColor:
|
],
|
||||||
Color(0xFFE26728),
|
),
|
||||||
|
SizedBox(height: 20),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.symmetric(
|
||||||
|
horizontal: 150),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
color: Colors.grey[200],
|
||||||
|
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(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment
|
||||||
|
.center,
|
||||||
|
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
|
||||||
|
? Text(
|
||||||
|
'File Uploaded: $fileName',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize:
|
||||||
|
16),
|
||||||
|
)
|
||||||
|
: ElevatedButton(
|
||||||
|
onPressed: () =>
|
||||||
|
_uploadFile(
|
||||||
|
'Policy Name'),
|
||||||
|
child: Text(
|
||||||
|
'Select File',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors
|
||||||
|
.white),
|
||||||
|
),
|
||||||
|
style: ElevatedButton
|
||||||
|
.styleFrom(
|
||||||
|
backgroundColor:
|
||||||
|
Color(
|
||||||
|
0xFFE26728),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Add more Text widgets for additional lines of text
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 20), // Add some space
|
],
|
||||||
// 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
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
|
isActive: _currentStep == 0,
|
||||||
),
|
),
|
||||||
),
|
Step(
|
||||||
isActive: _currentStep == 0,
|
title: Text(
|
||||||
),
|
'Excel Validation',
|
||||||
Step(
|
style: TextStyle(color: Color(0xFFE26728)),
|
||||||
title: Text(
|
),
|
||||||
'Excel Validation',
|
content: Padding(
|
||||||
style: TextStyle(color: Color(0xFFE26728)),
|
padding: EdgeInsets.only(
|
||||||
),
|
top: 30,
|
||||||
content: Padding(
|
bottom: 30,
|
||||||
padding: EdgeInsets.only(
|
left: 300,
|
||||||
top: 30,
|
right:
|
||||||
bottom: 30,
|
300), // Adjust the horizontal padding as needed
|
||||||
left: 300,
|
child: Column(
|
||||||
right:
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
300), // Adjust the horizontal padding as needed
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
child: Column(
|
children: [
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
_buildRowWithIcon(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
missingColumnErrorMsg == 0
|
||||||
children: [
|
? Icons.check_circle
|
||||||
_buildRowWithIcon(
|
: Icons.error,
|
||||||
missingColumnErrorMsg == 0
|
'No of column missing - $missingColumnErrorMsg',
|
||||||
? Icons.check_circle
|
iconColor: missingColumnErrorMsg == 0
|
||||||
: Icons.error,
|
? Colors.green
|
||||||
'No of column missing - $missingColumnErrorMsg',
|
: Colors
|
||||||
iconColor: missingColumnErrorMsg == 0
|
.red, // Set color based on condition
|
||||||
? Colors.green
|
),
|
||||||
: Colors.red, // Set color based on condition
|
if (missingColumnErrorMsg == 0)
|
||||||
|
_buildRowWithIcon(
|
||||||
|
columnIndexMismatchCount == 0
|
||||||
|
? Icons.check_circle
|
||||||
|
: Icons.error,
|
||||||
|
'Column Index is Missmatching - $columnIndexMismatchCount',
|
||||||
|
iconColor: columnIndexMismatchCount == 0
|
||||||
|
? Colors.green
|
||||||
|
: Colors.red,
|
||||||
|
),
|
||||||
|
// _buildRowWithIcon(
|
||||||
|
// columnMissingCount == 0
|
||||||
|
// ? Icons.check_circle
|
||||||
|
// : Icons.error,
|
||||||
|
// 'Column Missing - $columnMissingCount',
|
||||||
|
// iconColor: columnMissingCount == 0
|
||||||
|
// ? Colors.green
|
||||||
|
// : Colors.red,
|
||||||
|
// ),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
if (missingColumnErrorMsg == 0)
|
),
|
||||||
_buildRowWithIcon(
|
isActive: _currentStep == 1,
|
||||||
columnIndexMismatchCount == 0
|
|
||||||
? Icons.check_circle
|
|
||||||
: Icons.error,
|
|
||||||
'Column Index is Missmatching - $columnIndexMismatchCount',
|
|
||||||
iconColor: columnIndexMismatchCount == 0
|
|
||||||
? Colors.green
|
|
||||||
: Colors.red,
|
|
||||||
),
|
|
||||||
// _buildRowWithIcon(
|
|
||||||
// columnMissingCount == 0
|
|
||||||
// ? Icons.check_circle
|
|
||||||
// : Icons.error,
|
|
||||||
// 'Column Missing - $columnMissingCount',
|
|
||||||
// iconColor: columnMissingCount == 0
|
|
||||||
// ? Colors.green
|
|
||||||
// : Colors.red,
|
|
||||||
// ),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
Step(
|
||||||
isActive: _currentStep == 1,
|
title: Text(
|
||||||
),
|
'Preview',
|
||||||
Step(
|
style: TextStyle(color: Color(0xFFE26728)),
|
||||||
title: Text(
|
),
|
||||||
'Preview',
|
content: Column(
|
||||||
style: TextStyle(color: Color(0xFFE26728)),
|
|
||||||
),
|
|
||||||
content: Column(
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Row(
|
||||||
child: SingleChildScrollView(
|
children: [
|
||||||
child: _buildDataTable(),
|
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(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: _buildDataTable(),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
isActive: _currentStep == 2,
|
||||||
),
|
),
|
||||||
isActive: _currentStep == 2,
|
],
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 20),
|
|
||||||
if (_currentStep == 2)
|
|
||||||
Align(
|
|
||||||
alignment: Alignment.bottomRight,
|
|
||||||
child: ElevatedButton(
|
|
||||||
onPressed: () {
|
|
||||||
sendExcelFIleTOAPI();
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
'Complete',
|
|
||||||
style: TextStyle(color: Colors.white),
|
|
||||||
),
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
backgroundColor: Color(0xFFE26728),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
// SizedBox(height: 20),
|
||||||
SizedBox(height: 20),
|
// if (_currentStep == 2)
|
||||||
],
|
// Align(
|
||||||
|
// alignment: Alignment.bottomRight,
|
||||||
|
// child: ElevatedButton(
|
||||||
|
// onPressed: () {
|
||||||
|
// sendExcelFIleTOAPI();
|
||||||
|
// },
|
||||||
|
// child: Text(
|
||||||
|
// 'Complete',
|
||||||
|
// style: TextStyle(color: Colors.white),
|
||||||
|
// ),
|
||||||
|
// style: ElevatedButton.styleFrom(
|
||||||
|
// backgroundColor: Color(0xFFE26728),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// SizedBox(height: 20),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -484,7 +731,7 @@ class _excelVerifyState extends State<excelVerify> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
502
lib/hrHome.dart
502
lib/hrHome.dart
@ -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);
|
// Code to execute periodically every 2 seconds
|
||||||
Timer.periodic(duration, (timer) {
|
getEmployeeAndDependenceGPA(clintID, getPolicyNo0);
|
||||||
// Code to execute periodically every 2 seconds
|
getEmployeeAndDependenceGMC(clintID, getPolicyNo1);
|
||||||
getEmployeeAndDependenceGPA(clintID, getPolicyNo0);
|
|
||||||
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 {
|
|
||||||
request.fields['policy_id'] = '3';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Send the request
|
|
||||||
final response = await request.send();
|
|
||||||
|
|
||||||
// Check the status code of the response
|
|
||||||
if (response.statusCode == 200) {
|
|
||||||
// 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
|
||||||
|
filteredDataGpa = originalDataGpa.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 {
|
void searchGmc(String query) {
|
||||||
// print('Enter');
|
setState(() {
|
||||||
//
|
if (query.isEmpty) {
|
||||||
// if (kIsWeb) {
|
// If search query is empty, show all data
|
||||||
// print('WEB');
|
filteredDataGmc = List.from(originalDataGmc);
|
||||||
// final input = html.FileUploadInputElement();
|
} else {
|
||||||
// input.accept = '.xlsx,.xls'; // Specify accepted file types here
|
// Filter the data based on the search query
|
||||||
// input.click();
|
filteredDataGmc = originalDataGmc.where((item) {
|
||||||
// print('WEB111');
|
// Implement your filter logic here, for example:
|
||||||
// input.onChange.listen((event) {
|
return item['emp_code'].toLowerCase().contains(query.toLowerCase());
|
||||||
// final file = input.files!.first;
|
}).toList();
|
||||||
// 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 ?? '')),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -578,15 +304,50 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
|
|||||||
Expanded(
|
Expanded(
|
||||||
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),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -644,15 +411,50 @@ class _MyHrHomeState extends State<MyHrHome> with TickerProviderStateMixin {
|
|||||||
Expanded(
|
Expanded(
|
||||||
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),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
135
lib/hrLogin.dart
135
lib/hrLogin.dart
@ -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,43 +221,53 @@ class _MyPhoneState extends State<MyHrLogin> {
|
|||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(height: 15),
|
||||||
height:
|
Container(
|
||||||
20), // Add some space between rows
|
margin:
|
||||||
Row(
|
EdgeInsets.symmetric(horizontal: 150),
|
||||||
mainAxisAlignment:
|
child: Row(
|
||||||
MainAxisAlignment.center,
|
mainAxisAlignment:
|
||||||
children: [
|
MainAxisAlignment.center,
|
||||||
Text(
|
children: [
|
||||||
"Welcome to Nhance",
|
Text(
|
||||||
style: TextStyle(
|
"Welcome to Nhance",
|
||||||
fontSize: 16,
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 15,
|
height: 15,
|
||||||
),
|
),
|
||||||
Row(
|
Container(
|
||||||
mainAxisAlignment:
|
margin:
|
||||||
MainAxisAlignment.center,
|
EdgeInsets.symmetric(horizontal: 150),
|
||||||
children: [
|
child: Row(
|
||||||
Text(
|
mainAxisAlignment:
|
||||||
"Have a Health Insurance Policy number, but never signed in? Don't worry, We got you covered",
|
MainAxisAlignment.center,
|
||||||
style: TextStyle(
|
children: [
|
||||||
fontSize: 12,
|
Expanded(
|
||||||
color: Color(0xFF000000)),
|
child: Text(
|
||||||
textAlign: TextAlign.center,
|
"Have a Health Insurance Policy number, but never signed in? Don't worry, We got you covered",
|
||||||
),
|
style: TextStyle(
|
||||||
],
|
fontSize: 12,
|
||||||
|
color: Color(0xFF000000)),
|
||||||
|
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,22 +333,26 @@ class _MyPhoneState extends State<MyHrLogin> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20,
|
height: 20,
|
||||||
),
|
),
|
||||||
SizedBox(
|
Container(
|
||||||
width: double.infinity,
|
margin:
|
||||||
height: 45,
|
EdgeInsets.symmetric(horizontal: 150),
|
||||||
child: ElevatedButton(
|
child: SizedBox(
|
||||||
style: ElevatedButton.styleFrom(
|
width: double.infinity,
|
||||||
backgroundColor: Color(0xFF00989E),
|
height: 45,
|
||||||
shape: RoundedRectangleBorder(
|
child: ElevatedButton(
|
||||||
borderRadius:
|
style: ElevatedButton.styleFrom(
|
||||||
BorderRadius.circular(10),
|
backgroundColor: Color(0xFF00989E),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: handleSubmit,
|
||||||
|
child: Text(
|
||||||
|
"Login With OTP",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFFFFFFFF)),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
onPressed: handleSubmit,
|
|
||||||
child: Text(
|
|
||||||
"Login With OTP",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xFFFFFFFF)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -348,22 +360,27 @@ class _MyPhoneState extends State<MyHrLogin> {
|
|||||||
height: _size.width <= 1100 ? 0 : 0,
|
height: _size.width <= 1100 ? 0 : 0,
|
||||||
),
|
),
|
||||||
_size.width > 1100
|
_size.width > 1100
|
||||||
? Column(
|
? Container(
|
||||||
children: [
|
margin: EdgeInsets.symmetric(
|
||||||
SizedBox(height: 30),
|
horizontal: 150),
|
||||||
Text(
|
child: Column(
|
||||||
"Benefits of Login",
|
children: [
|
||||||
style: TextStyle(
|
SizedBox(height: 30),
|
||||||
fontSize: 20,
|
Text(
|
||||||
fontWeight: FontWeight.bold,
|
"Benefits of Login",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
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,
|
||||||
|
|||||||
@ -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(),
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
178
lib/phone.dart
178
lib/phone.dart
@ -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,71 +163,90 @@ 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:
|
||||||
Navigator.pushNamed(
|
SystemMouseCursors.click,
|
||||||
context, 'hrLogin');
|
child: GestureDetector(
|
||||||
},
|
onTap: () {
|
||||||
child: Text(
|
// Add your navigation logic here
|
||||||
'HR login',
|
// For example, you can use Navigator.push to navigate to another page
|
||||||
style: TextStyle(
|
Navigator.pushNamed(
|
||||||
color: Color(0xFF00989E)),
|
context, 'hrLogin');
|
||||||
),
|
},
|
||||||
style: ElevatedButton.styleFrom(
|
child: Row(
|
||||||
backgroundColor: Colors.white,
|
children: [
|
||||||
shape: RoundedRectangleBorder(
|
Text(
|
||||||
borderRadius:
|
'HR Login',
|
||||||
BorderRadius.circular(
|
style: TextStyle(
|
||||||
5),
|
color: Color(
|
||||||
side: BorderSide(
|
0xFF000000), // Text color
|
||||||
color: Color(
|
// Add other text styles as needed
|
||||||
0xFF00989E)), // Add border
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 5),
|
||||||
|
Icon(
|
||||||
|
Icons
|
||||||
|
.east, // Icon for customer login
|
||||||
|
color: Colors
|
||||||
|
.black, // Adjust color as needed
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
))
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(height: 15),
|
||||||
height:
|
Container(
|
||||||
20), // Add some space between rows
|
margin:
|
||||||
Row(
|
EdgeInsets.symmetric(horizontal: 150),
|
||||||
mainAxisAlignment:
|
child: Row(
|
||||||
MainAxisAlignment.center,
|
mainAxisAlignment:
|
||||||
children: [
|
MainAxisAlignment.center,
|
||||||
Text(
|
children: [
|
||||||
"Welcome to Nhance",
|
Text(
|
||||||
style: TextStyle(
|
"Welcome to Nhance",
|
||||||
fontSize: 16,
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 15,
|
height: 15,
|
||||||
),
|
),
|
||||||
Row(
|
Container(
|
||||||
mainAxisAlignment:
|
margin:
|
||||||
MainAxisAlignment.center,
|
EdgeInsets.symmetric(horizontal: 150),
|
||||||
children: [
|
child: Row(
|
||||||
Text(
|
mainAxisAlignment:
|
||||||
"Have a Health Insurance Policy number, but never signed in? Don't worry, We got you covered",
|
MainAxisAlignment.center,
|
||||||
style: TextStyle(
|
children: [
|
||||||
fontSize: 12,
|
Expanded(
|
||||||
color: Color(0xFF000000)),
|
child: Text(
|
||||||
textAlign: TextAlign.center,
|
"Have a Health Insurance Policy number, but never signed in? Don't worry, We got you covered",
|
||||||
),
|
style: TextStyle(
|
||||||
],
|
fontSize: 12,
|
||||||
|
color: Color(0xFF000000)),
|
||||||
|
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,22 +312,26 @@ class _MyPhoneState extends State<MyPhone> {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20,
|
height: 20,
|
||||||
),
|
),
|
||||||
SizedBox(
|
Container(
|
||||||
width: double.infinity,
|
margin:
|
||||||
height: 45,
|
EdgeInsets.symmetric(horizontal: 150),
|
||||||
child: ElevatedButton(
|
child: SizedBox(
|
||||||
style: ElevatedButton.styleFrom(
|
width: double.infinity,
|
||||||
backgroundColor: Color(0xFF00989E),
|
height: 45,
|
||||||
shape: RoundedRectangleBorder(
|
child: ElevatedButton(
|
||||||
borderRadius:
|
style: ElevatedButton.styleFrom(
|
||||||
BorderRadius.circular(10),
|
backgroundColor: Color(0xFF00989E),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onPressed: handleSubmit,
|
||||||
|
child: Text(
|
||||||
|
"Login With OTP",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFFFFFFFF)),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
onPressed: handleSubmit,
|
|
||||||
child: Text(
|
|
||||||
"Login With OTP",
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xFFFFFFFF)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -316,22 +339,27 @@ class _MyPhoneState extends State<MyPhone> {
|
|||||||
height: _size.width <= 1100 ? 0 : 0,
|
height: _size.width <= 1100 ? 0 : 0,
|
||||||
),
|
),
|
||||||
_size.width > 1100
|
_size.width > 1100
|
||||||
? Column(
|
? Container(
|
||||||
children: [
|
margin: EdgeInsets.symmetric(
|
||||||
SizedBox(height: 30),
|
horizontal: 150),
|
||||||
Text(
|
child: Column(
|
||||||
"Benefits of Login",
|
children: [
|
||||||
style: TextStyle(
|
SizedBox(height: 30),
|
||||||
fontSize: 20,
|
Text(
|
||||||
fontWeight: FontWeight.bold,
|
"Benefits of Login",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
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,
|
||||||
|
|||||||
@ -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');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user