new firebase account
This commit is contained in:
parent
69cc7aeb06
commit
218225722a
Binary file not shown.
@ -29,8 +29,6 @@ import 'models/environment.dart';
|
|||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
// Initialize Firebase only if it's not already initialized
|
|
||||||
if (Firebase.apps.isEmpty) {
|
|
||||||
await Firebase.initializeApp(
|
await Firebase.initializeApp(
|
||||||
options: const FirebaseOptions(
|
options: const FirebaseOptions(
|
||||||
apiKey: 'AIzaSyC4yHbCX4mQu0jO81pJrDwxKLQlTQWofrc',
|
apiKey: 'AIzaSyC4yHbCX4mQu0jO81pJrDwxKLQlTQWofrc',
|
||||||
@ -38,7 +36,6 @@ Future<void> main() async {
|
|||||||
messagingSenderId: '1084115316849',
|
messagingSenderId: '1084115316849',
|
||||||
projectId: 'nhance-ee8d1'));
|
projectId: 'nhance-ee8d1'));
|
||||||
await dotenv.load(fileName: Environment.fileName);
|
await dotenv.load(fileName: Environment.fileName);
|
||||||
}
|
|
||||||
|
|
||||||
// Load environment variables
|
// Load environment variables
|
||||||
await dotenv.load(fileName: Environment.fileName);
|
await dotenv.load(fileName: Environment.fileName);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -28,10 +28,12 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
late ApiService apiService;
|
late ApiService apiService;
|
||||||
bool isLoading = true;
|
bool isLoading = true;
|
||||||
bool isChecked = false; // Declare the _isSwitched variable here
|
bool isChecked = false; // Declare the _isSwitched variable here
|
||||||
|
bool disclaimeStatus = false; // Declare the _isSwitched variable here
|
||||||
bool topUpSiIsChecked = false; // Declare the _isSwitched variable here
|
bool topUpSiIsChecked = false; // Declare the _isSwitched variable here
|
||||||
bool topUpParentIsChecked = false; // Declare the _isSwitched variable here
|
bool topUpParentIsChecked = false; // Declare the _isSwitched variable here
|
||||||
bool addOnsDependentIsChecked =
|
bool addOnsDependentIsChecked =
|
||||||
false; // Declare the _isSwitched variable here
|
false; // Declare the _isSwitched variable here
|
||||||
|
|
||||||
dynamic _token;
|
dynamic _token;
|
||||||
dynamic empCodeString;
|
dynamic empCodeString;
|
||||||
dynamic empPrimaryId;
|
dynamic empPrimaryId;
|
||||||
@ -50,6 +52,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
dynamic gpaSelfDetails;
|
dynamic gpaSelfDetails;
|
||||||
dynamic gpaECardDownload;
|
dynamic gpaECardDownload;
|
||||||
dynamic gmcECardDownload;
|
dynamic gmcECardDownload;
|
||||||
|
dynamic gmcDisclaimer;
|
||||||
dynamic gmcClintPolicyId = 0;
|
dynamic gmcClintPolicyId = 0;
|
||||||
dynamic gmcMappedFamilyFloaters = [];
|
dynamic gmcMappedFamilyFloaters = [];
|
||||||
dynamic gmcSelfName;
|
dynamic gmcSelfName;
|
||||||
@ -137,6 +140,9 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
dynamic topUpParentOpenForEnrollment;
|
dynamic topUpParentOpenForEnrollment;
|
||||||
dynamic addOnsDependentOpenForEnrollment;
|
dynamic addOnsDependentOpenForEnrollment;
|
||||||
bool gmcEnrollmentStatus = false;
|
bool gmcEnrollmentStatus = false;
|
||||||
|
List<Map<String, dynamic>> allDisclaimer =
|
||||||
|
[]; // Declare this to store all disclaimers
|
||||||
|
late List<bool> checkboxValues;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -148,6 +154,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
isLoading = false;
|
isLoading = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
checkboxValues = List<bool>.filled(allDisclaimer.length, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -322,6 +329,48 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
gpaPolicies = response['data'];
|
gpaPolicies = response['data'];
|
||||||
print('gpaPolicies');
|
print('gpaPolicies');
|
||||||
|
for (var item in gpaPolicies) {
|
||||||
|
// Extract disclaimer value from each object
|
||||||
|
dynamic disclaimer = item['disclaimer'];
|
||||||
|
|
||||||
|
if (disclaimer != null && disclaimer.isNotEmpty) {
|
||||||
|
// Temporary list to hold new entries
|
||||||
|
List<Map<String, dynamic>> newEntries = [];
|
||||||
|
|
||||||
|
if (disclaimer is String) {
|
||||||
|
// Wrap string in a map with id and checked
|
||||||
|
newEntries.add({
|
||||||
|
'id': allDisclaimer.length + 1, // Unique ID based on length
|
||||||
|
'text': disclaimer,
|
||||||
|
'checked': false,
|
||||||
|
});
|
||||||
|
} else if (disclaimer is List) {
|
||||||
|
// Convert each string in the list to a map with id and checked
|
||||||
|
newEntries.addAll(
|
||||||
|
List<Map<String, dynamic>>.from(
|
||||||
|
disclaimer.map((text) => {
|
||||||
|
'id': allDisclaimer.length + newEntries.length + 1,
|
||||||
|
'text': text,
|
||||||
|
'checked': false,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
print('Unexpected type for disclaimer');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add new entries to the main list, ensuring no duplicate texts
|
||||||
|
newEntries.forEach((entry) {
|
||||||
|
if (!allDisclaimer
|
||||||
|
.any((item) => item['text'] == entry['text'])) {
|
||||||
|
allDisclaimer.add(entry);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update the state
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -350,6 +399,48 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
gmcPolicies = response['data'];
|
gmcPolicies = response['data'];
|
||||||
print('gmcPolicies');
|
print('gmcPolicies');
|
||||||
|
for (var item in gmcPolicies) {
|
||||||
|
// Extract disclaimer value from each object
|
||||||
|
dynamic disclaimer = item['disclaimer'];
|
||||||
|
|
||||||
|
if (disclaimer != null && disclaimer.isNotEmpty) {
|
||||||
|
// Temporary list to hold new entries
|
||||||
|
List<Map<String, dynamic>> newEntries = [];
|
||||||
|
|
||||||
|
if (disclaimer is String) {
|
||||||
|
// Wrap string in a map with id and checked
|
||||||
|
newEntries.add({
|
||||||
|
'id': allDisclaimer.length + 1, // Unique ID based on length
|
||||||
|
'text': disclaimer,
|
||||||
|
'checked': false,
|
||||||
|
});
|
||||||
|
} else if (disclaimer is List) {
|
||||||
|
// Convert each string in the list to a map with id and checked
|
||||||
|
newEntries.addAll(
|
||||||
|
List<Map<String, dynamic>>.from(
|
||||||
|
disclaimer.map((text) => {
|
||||||
|
'id': allDisclaimer.length + newEntries.length + 1,
|
||||||
|
'text': text,
|
||||||
|
'checked': false,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
print('Unexpected type for disclaimer');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add new entries to the main list, ensuring no duplicate texts
|
||||||
|
newEntries.forEach((entry) {
|
||||||
|
if (!allDisclaimer
|
||||||
|
.any((item) => item['text'] == entry['text'])) {
|
||||||
|
allDisclaimer.add(entry);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update the state
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// Assuming data is a List
|
// Assuming data is a List
|
||||||
print(gmcPolicies);
|
print(gmcPolicies);
|
||||||
@ -417,6 +508,45 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
|
|
||||||
topUpDisclaimer =
|
topUpDisclaimer =
|
||||||
await topUpSiPolicies['gmc_si_topup']['disclaimer'];
|
await topUpSiPolicies['gmc_si_topup']['disclaimer'];
|
||||||
|
|
||||||
|
if (topUpDisclaimer != null && topUpDisclaimer.isNotEmpty) {
|
||||||
|
// Temporary list to hold new entries
|
||||||
|
List<Map<String, dynamic>> newEntries = [];
|
||||||
|
|
||||||
|
if (topUpDisclaimer is String) {
|
||||||
|
// Wrap string in a map with id and checked
|
||||||
|
newEntries.add({
|
||||||
|
'id': allDisclaimer.length + 1, // Unique ID based on length
|
||||||
|
'text': topUpDisclaimer,
|
||||||
|
'checked': false,
|
||||||
|
});
|
||||||
|
} else if (topUpDisclaimer is List) {
|
||||||
|
// Convert each string in the list to a map with id and checked
|
||||||
|
newEntries.addAll(
|
||||||
|
List<Map<String, dynamic>>.from(
|
||||||
|
topUpDisclaimer.map((text) => {
|
||||||
|
'id': allDisclaimer.length + newEntries.length + 1,
|
||||||
|
'text': text,
|
||||||
|
'checked': false,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
print('Unexpected type for disclaimer');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add new entries to the main list, ensuring no duplicate texts
|
||||||
|
newEntries.forEach((entry) {
|
||||||
|
if (!allDisclaimer
|
||||||
|
.any((item) => item['text'] == entry['text'])) {
|
||||||
|
allDisclaimer.add(entry);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update the state
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
// allDisclaimer = allDisclaimer.toSet().toList();
|
||||||
// });
|
// });
|
||||||
} else {
|
} else {
|
||||||
print('No data found in the response');
|
print('No data found in the response');
|
||||||
@ -514,6 +644,45 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
topUpParentDisclaimer =
|
topUpParentDisclaimer =
|
||||||
await topUpSiParentPolicies['gmc_si_parent_topup']
|
await topUpSiParentPolicies['gmc_si_parent_topup']
|
||||||
['disclaimer'];
|
['disclaimer'];
|
||||||
|
|
||||||
|
if (topUpParentDisclaimer != null &&
|
||||||
|
topUpParentDisclaimer.isNotEmpty) {
|
||||||
|
// Temporary list to hold new entries
|
||||||
|
List<Map<String, dynamic>> newEntries = [];
|
||||||
|
|
||||||
|
if (topUpParentDisclaimer is String) {
|
||||||
|
// Wrap string in a map with id and checked
|
||||||
|
newEntries.add({
|
||||||
|
'id': allDisclaimer.length + 1, // Unique ID based on length
|
||||||
|
'text': topUpParentDisclaimer,
|
||||||
|
'checked': false,
|
||||||
|
});
|
||||||
|
} else if (topUpParentDisclaimer is List) {
|
||||||
|
// Convert each string in the list to a map with id and checked
|
||||||
|
newEntries.addAll(
|
||||||
|
List<Map<String, dynamic>>.from(
|
||||||
|
topUpParentDisclaimer.map((text) => {
|
||||||
|
'id': allDisclaimer.length + newEntries.length + 1,
|
||||||
|
'text': text,
|
||||||
|
'checked': false,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
print('Unexpected type for disclaimer');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add new entries to the main list, ensuring no duplicate texts
|
||||||
|
newEntries.forEach((entry) {
|
||||||
|
if (!allDisclaimer
|
||||||
|
.any((item) => item['text'] == entry['text'])) {
|
||||||
|
allDisclaimer.add(entry);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update the state
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
print('No data found in the response');
|
print('No data found in the response');
|
||||||
}
|
}
|
||||||
@ -587,6 +756,45 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
await addOnsDependentPolicies['gmc_dependent_addon']
|
await addOnsDependentPolicies['gmc_dependent_addon']
|
||||||
['disclaimer'];
|
['disclaimer'];
|
||||||
|
|
||||||
|
if (addOnsDependentDisclaimer != null &&
|
||||||
|
addOnsDependentDisclaimer.isNotEmpty) {
|
||||||
|
// Temporary list to hold new entries
|
||||||
|
List<Map<String, dynamic>> newEntries = [];
|
||||||
|
|
||||||
|
if (addOnsDependentDisclaimer is String) {
|
||||||
|
// Wrap string in a map with id and checked
|
||||||
|
newEntries.add({
|
||||||
|
'id': allDisclaimer.length + 1, // Unique ID based on length
|
||||||
|
'text': addOnsDependentDisclaimer,
|
||||||
|
'checked': false,
|
||||||
|
});
|
||||||
|
} else if (addOnsDependentDisclaimer is List) {
|
||||||
|
// Convert each string in the list to a map with id and checked
|
||||||
|
newEntries.addAll(
|
||||||
|
List<Map<String, dynamic>>.from(
|
||||||
|
addOnsDependentDisclaimer.map((text) => {
|
||||||
|
'id': allDisclaimer.length + newEntries.length + 1,
|
||||||
|
'text': text,
|
||||||
|
'checked': false,
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
print('Unexpected type for disclaimer');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add new entries to the main list, ensuring no duplicate texts
|
||||||
|
newEntries.forEach((entry) {
|
||||||
|
if (!allDisclaimer
|
||||||
|
.any((item) => item['text'] == entry['text'])) {
|
||||||
|
allDisclaimer.add(entry);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update the state
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
|
||||||
addOnsDependentOpenForEnrollment =
|
addOnsDependentOpenForEnrollment =
|
||||||
await addOnsDependentPolicies['gmc_dependent_addon']
|
await addOnsDependentPolicies['gmc_dependent_addon']
|
||||||
['OpenForEnrollment'];
|
['OpenForEnrollment'];
|
||||||
@ -795,28 +1003,25 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool isSubmitEnabled() {
|
bool isSubmitEnabled() {
|
||||||
print(
|
// // Convert to integers and handle null values by defaulting to 0
|
||||||
'topUpOpenForEnrollment: $topUpOpenForEnrollment (type: ${topUpOpenForEnrollment?.runtimeType})');
|
// bool enrollmentConditionsMet =
|
||||||
print(
|
// (int.tryParse(topUpOpenForEnrollment ?? '0') != 0) &&
|
||||||
'topUpParentOpenForEnrollment: $topUpParentOpenForEnrollment (type: ${topUpParentOpenForEnrollment?.runtimeType})');
|
// (int.tryParse(topUpParentOpenForEnrollment ?? '0') != 0) &&
|
||||||
print(
|
// (int.tryParse(addOnsDependentOpenForEnrollment ?? '0') != 0);
|
||||||
'addOnsDependentOpenForEnrollment: $addOnsDependentOpenForEnrollment (type: ${addOnsDependentOpenForEnrollment?.runtimeType})');
|
//
|
||||||
|
// print('enrollmentConditionsMet: $enrollmentConditionsMet');
|
||||||
|
// print('gmcEnrollmentStatus: $gmcEnrollmentStatus');
|
||||||
|
|
||||||
// Convert to integers and handle null values by defaulting to 0
|
// return isChecked &&
|
||||||
bool enrollmentConditionsMet =
|
// enrollmentConditionsMet &&
|
||||||
(int.tryParse(topUpOpenForEnrollment ?? '0') != 0) &&
|
// gmcEnrollmentStatus &&
|
||||||
(int.tryParse(topUpParentOpenForEnrollment ?? '0') != 0) &&
|
// (activeSiData == 1 ? topUpSiIsChecked : true) &&
|
||||||
(int.tryParse(addOnsDependentOpenForEnrollment ?? '0') != 0);
|
// (activeSiParentData == 1 ? topUpParentIsChecked : true) &&
|
||||||
|
// (activeDependentData == 1 ? addOnsDependentIsChecked : true);
|
||||||
|
disclaimeStatus = allDisclaimer.every((item) => item['checked'] == true);
|
||||||
|
|
||||||
print('enrollmentConditionsMet: $enrollmentConditionsMet');
|
// Combine the `disclaimeStatus` and `isChecked` conditions
|
||||||
print('gmcEnrollmentStatus: $gmcEnrollmentStatus');
|
return isChecked && disclaimeStatus;
|
||||||
|
|
||||||
return isChecked &&
|
|
||||||
enrollmentConditionsMet &&
|
|
||||||
gmcEnrollmentStatus &&
|
|
||||||
(activeSiData == 1 ? topUpSiIsChecked : true) &&
|
|
||||||
(activeSiParentData == 1 ? topUpParentIsChecked : true) &&
|
|
||||||
(activeDependentData == 1 ? addOnsDependentIsChecked : true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isEnrollmentOpen(List<dynamic>? policyList) {
|
bool isEnrollmentOpen(List<dynamic>? policyList) {
|
||||||
@ -2212,7 +2417,7 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
flex: 11,
|
flex: 11,
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerLeft,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
MainAxisAlignment.end,
|
MainAxisAlignment.end,
|
||||||
@ -2239,168 +2444,53 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 15),
|
SizedBox(height: 10),
|
||||||
if (activeSiData == 1)
|
|
||||||
Container(
|
Container(
|
||||||
child: Row(
|
// padding: EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: allDisclaimer.isEmpty
|
||||||
|
? [] // If allDisclaimer is empty, show nothing
|
||||||
|
: allDisclaimer.map<Widget>((entry) {
|
||||||
|
int id =
|
||||||
|
entry['id']; // ID of disclaimer
|
||||||
|
String disclaimer =
|
||||||
|
entry['text']; // Disclaimer text
|
||||||
|
bool isChecked =
|
||||||
|
entry['checked']; // Checked state
|
||||||
|
|
||||||
|
return Row(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Column(
|
child: Checkbox(
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Checkbox(
|
|
||||||
value: topUpSiIsChecked,
|
|
||||||
onChanged: (bool? value) {
|
|
||||||
setState(() {
|
|
||||||
topUpSiIsChecked = value!;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
activeColor:
|
|
||||||
Color(0xFFE26728),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
))),
|
|
||||||
Expanded(
|
|
||||||
flex: 11,
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.centerRight,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.end,
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
topUpDisclaimer ?? '',
|
|
||||||
textAlign:
|
|
||||||
Responsive.isDesktop(
|
|
||||||
context)
|
|
||||||
? TextAlign.left
|
|
||||||
: TextAlign.start,
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
fontSize:
|
|
||||||
Responsive.isDesktop(
|
|
||||||
context)
|
|
||||||
? 18
|
|
||||||
: 15,
|
|
||||||
color: Color(0xFF292929),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
))),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 15),
|
|
||||||
if (activeSiParentData == 1)
|
|
||||||
Container(
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Checkbox(
|
|
||||||
value: topUpParentIsChecked,
|
|
||||||
onChanged: (bool? value) {
|
|
||||||
setState(() {
|
|
||||||
topUpParentIsChecked =
|
|
||||||
value!;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
activeColor:
|
|
||||||
Color(0xFFE26728),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
))),
|
|
||||||
Expanded(
|
|
||||||
flex: 11,
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.centerRight,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.end,
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
topUpParentDisclaimer ?? '',
|
|
||||||
textAlign:
|
|
||||||
Responsive.isDesktop(
|
|
||||||
context)
|
|
||||||
? TextAlign.left
|
|
||||||
: TextAlign.start,
|
|
||||||
style: GoogleFonts.poppins(
|
|
||||||
fontSize:
|
|
||||||
Responsive.isDesktop(
|
|
||||||
context)
|
|
||||||
? 18
|
|
||||||
: 15,
|
|
||||||
color: Color(0xFF292929),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
))),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 15),
|
|
||||||
if (activeDependentData == 1)
|
|
||||||
Container(
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Checkbox(
|
|
||||||
value:
|
value:
|
||||||
addOnsDependentIsChecked,
|
isChecked, // Bind to the checked value
|
||||||
onChanged: (bool? value) {
|
onChanged: (bool? value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
addOnsDependentIsChecked =
|
// Update the checked status
|
||||||
value!;
|
allDisclaimer.firstWhere(
|
||||||
|
(item) =>
|
||||||
|
item['id'] == id,
|
||||||
|
)['checked'] = value!;
|
||||||
|
print(allDisclaimer);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
activeColor:
|
activeColor: Color(
|
||||||
Color(0xFFE26728),
|
0xFFE26728), // Custom color
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
))),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 11,
|
flex: 11,
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerLeft,
|
||||||
child: Column(
|
child: Text(
|
||||||
mainAxisAlignment:
|
disclaimer,
|
||||||
MainAxisAlignment.end,
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
addOnsDependentDisclaimer ??
|
|
||||||
'',
|
|
||||||
textAlign:
|
textAlign:
|
||||||
Responsive.isDesktop(
|
Responsive.isDesktop(
|
||||||
context)
|
context)
|
||||||
@ -2415,9 +2505,11 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
color: Color(0xFF292929),
|
color: Color(0xFF292929),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
))),
|
);
|
||||||
],
|
}).toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -2585,6 +2677,11 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
String? gpaPolicyType = item['type'];
|
String? gpaPolicyType = item['type'];
|
||||||
String? gpaECardDownload = item['eCardDownload'];
|
String? gpaECardDownload = item['eCardDownload'];
|
||||||
String? gpaSumInsured;
|
String? gpaSumInsured;
|
||||||
|
print('GPA Disclaimer $allDisclaimer');
|
||||||
|
setState(() {
|
||||||
|
checkboxValues = List.generate(allDisclaimer.length, (_) => false);
|
||||||
|
});
|
||||||
|
|
||||||
List<dynamic> gpaMappedFamilyFloaters = [];
|
List<dynamic> gpaMappedFamilyFloaters = [];
|
||||||
|
|
||||||
if (item['mapped_family_floaters'] != null) {
|
if (item['mapped_family_floaters'] != null) {
|
||||||
@ -2777,6 +2874,8 @@ class _empReviewDetailsState extends State<empReviewDetails> {
|
|||||||
gmcECardDownload = item['eCardDownload'];
|
gmcECardDownload = item['eCardDownload'];
|
||||||
// gmcSumInsured = item['Policy_Terms']['sum_insured'];
|
// gmcSumInsured = item['Policy_Terms']['sum_insured'];
|
||||||
gmcMappedFamilyFloaters = item['mapped_family_floaters'];
|
gmcMappedFamilyFloaters = item['mapped_family_floaters'];
|
||||||
|
// allDisclaimer = allDisclaimer.toSet().toList();
|
||||||
|
print('GPA Disclaimer $allDisclaimer');
|
||||||
dynamic getTrueObjects = gmcMappedFamilyFloaters
|
dynamic getTrueObjects = gmcMappedFamilyFloaters
|
||||||
.where((element) => element['is_value_exist'] == true)
|
.where((element) => element['is_value_exist'] == true)
|
||||||
.toList();
|
.toList();
|
||||||
|
|||||||
@ -6,13 +6,9 @@
|
|||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <smart_auth/smart_auth_plugin.h>
|
|
||||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||||
|
|
||||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||||
g_autoptr(FlPluginRegistrar) smart_auth_registrar =
|
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "SmartAuthPlugin");
|
|
||||||
smart_auth_plugin_register_with_registrar(smart_auth_registrar);
|
|
||||||
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
||||||
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
smart_auth
|
|
||||||
url_launcher_linux
|
url_launcher_linux
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -12,8 +12,7 @@ import google_sign_in_ios
|
|||||||
import local_auth_darwin
|
import local_auth_darwin
|
||||||
import path_provider_foundation
|
import path_provider_foundation
|
||||||
import shared_preferences_foundation
|
import shared_preferences_foundation
|
||||||
import smart_auth
|
import sqflite_darwin
|
||||||
import sqflite
|
|
||||||
import url_launcher_macos
|
import url_launcher_macos
|
||||||
import video_player_avfoundation
|
import video_player_avfoundation
|
||||||
|
|
||||||
@ -25,7 +24,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||||||
FLALocalAuthPlugin.register(with: registry.registrar(forPlugin: "FLALocalAuthPlugin"))
|
FLALocalAuthPlugin.register(with: registry.registrar(forPlugin: "FLALocalAuthPlugin"))
|
||||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
SmartAuthPlugin.register(with: registry.registrar(forPlugin: "SmartAuthPlugin"))
|
|
||||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||||
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
|
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
|
||||||
|
|||||||
@ -36,7 +36,7 @@ dependencies:
|
|||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.8
|
cupertino_icons: ^1.0.8
|
||||||
animated_bottom_navigation_bar: ^1.3.3
|
animated_bottom_navigation_bar: ^1.3.3
|
||||||
pinput: ^4.0.0
|
pinput: ^5.0.0
|
||||||
http: ^1.2.1
|
http: ^1.2.1
|
||||||
shared_preferences: ^2.2.3
|
shared_preferences: ^2.2.3
|
||||||
flutter_dotenv: ^5.1.0
|
flutter_dotenv: ^5.1.0
|
||||||
@ -65,7 +65,7 @@ dev_dependencies:
|
|||||||
# activated in the `analysis_options.yaml` file located at the root of your
|
# activated in the `analysis_options.yaml` file located at the root of your
|
||||||
# package. See that file for information about deactivating specific lint
|
# package. See that file for information about deactivating specific lint
|
||||||
# rules and activating additional ones.
|
# rules and activating additional ones.
|
||||||
flutter_lints: ^3.0.0
|
flutter_lints: ^5.0.0
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
|
|||||||
@ -59,14 +59,13 @@
|
|||||||
// Import the functions you need from the SDKs you need
|
// Import the functions you need from the SDKs you need
|
||||||
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.12.4/firebase-app.js";
|
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.12.4/firebase-app.js";
|
||||||
|
|
||||||
// Your web app's Firebase configuration
|
|
||||||
const firebaseConfig = {
|
const firebaseConfig = {
|
||||||
apiKey: "AIzaSyDg6lonV9STSIwJ4x261tcTGALEhX98LqY",
|
apiKey: "AIzaSyCnxkfRZW6EkON2laovunzYRXgHvHEPo0E",
|
||||||
authDomain: "nhance-app-4fedb.firebaseapp.com",
|
authDomain: "nhance-ee8d1.firebaseapp.com",
|
||||||
projectId: "nhance-app-4fedb",
|
projectId: "nhance-ee8d1",
|
||||||
storageBucket: "nhance-app-4fedb.appspot.com",
|
storageBucket: "nhance-ee8d1.firebasestorage.app",
|
||||||
messagingSenderId: "508866094093",
|
messagingSenderId: "1084115316849",
|
||||||
appId: "1:508866094093:web:82f8ad47ccb63688366144"
|
appId: "1:1084115316849:web:8fc3b1c886349ae86c6bd0"
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initialize Firebase
|
// Initialize Firebase
|
||||||
|
|||||||
@ -9,7 +9,6 @@
|
|||||||
#include <firebase_auth/firebase_auth_plugin_c_api.h>
|
#include <firebase_auth/firebase_auth_plugin_c_api.h>
|
||||||
#include <firebase_core/firebase_core_plugin_c_api.h>
|
#include <firebase_core/firebase_core_plugin_c_api.h>
|
||||||
#include <local_auth_windows/local_auth_plugin.h>
|
#include <local_auth_windows/local_auth_plugin.h>
|
||||||
#include <smart_auth/smart_auth_plugin.h>
|
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
@ -19,8 +18,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
|||||||
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
|
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
|
||||||
LocalAuthPluginRegisterWithRegistrar(
|
LocalAuthPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("LocalAuthPlugin"));
|
registry->GetRegistrarForPlugin("LocalAuthPlugin"));
|
||||||
SmartAuthPluginRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("SmartAuthPlugin"));
|
|
||||||
UrlLauncherWindowsRegisterWithRegistrar(
|
UrlLauncherWindowsRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||||||
firebase_auth
|
firebase_auth
|
||||||
firebase_core
|
firebase_core
|
||||||
local_auth_windows
|
local_auth_windows
|
||||||
smart_auth
|
|
||||||
url_launcher_windows
|
url_launcher_windows
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user