diff --git a/android/app/build.gradle b/android/app/build.gradle index 14f2934..88414d0 100755 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -19,12 +19,12 @@ if (project.hasProperty('google-services.json')) { def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { - flutterVersionCode = '47' + flutterVersionCode = '53' } def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { - flutterVersionName = '2.0.9' + flutterVersionName = '2.0.15' } def keystoreProperties = new Properties() diff --git a/lib/customAppBar/enrollmentAppBar.dart b/lib/customAppBar/enrollmentAppBar.dart index 502b3fe..ca16974 100755 --- a/lib/customAppBar/enrollmentAppBar.dart +++ b/lib/customAppBar/enrollmentAppBar.dart @@ -80,6 +80,7 @@ class _CustomAppBarState extends State { body: json.encode(params), headers: { HttpHeaders.contentTypeHeader: 'application/json', + 'APP-SIGNATURE': 'nhance-2025-signature-T8f6gV9k5fK2wf5V5c4vId3b0J8z6cAm2x8Y', }, ); diff --git a/lib/pages/enrollment/addons.dart b/lib/pages/enrollment/addons.dart index cd02221..1da83f4 100755 --- a/lib/pages/enrollment/addons.dart +++ b/lib/pages/enrollment/addons.dart @@ -99,7 +99,7 @@ class _addOnsDetailsState extends State { dynamic topUpParentSiPremiumValue; dynamic topUpParentSiPremiumGst; dynamic topUpParentSiTotalAmt; - dynamic topUpParenIsPremiumSummery; + bool topUpParentIsPremiumSummary = false; dynamic topUpParentTypeName; int topUpParentOpenForEnrollment = 0; dynamic addOnsDependentPolicies = []; @@ -111,7 +111,7 @@ class _addOnsDetailsState extends State { dynamic addOnsDependentPolicyName; dynamic addOnsDependentPolicyType; dynamic addOnsDependentECardDownload; - dynamic addOnsDependentIsPremiumSummery; + bool addOnsDependentIsPremiumSummary = false; dynamic addOnsDependentRelationShip; int addOnsDependentOpenForEnrollment = 0; dynamic siValue; @@ -123,7 +123,7 @@ class _addOnsDetailsState extends State { dynamic addOnsDependentTotalAmt; // dynamic topUpSiTotalAmt; dynamic topUpSiTotalAmt; - dynamic topUpSiPremiumSummery; + bool topUpIsPremiumSummary = false; late TextEditingController _relationShipController; late TextEditingController _dobController; late TextEditingController _memberNameController; @@ -232,6 +232,11 @@ class _addOnsDetailsState extends State { } } + bool isPremiumEnabled(dynamic value) { + final intValue = int.tryParse(value?.toString() ?? '0') ?? 0; + return intValue != 0; + } + // Future _loadToken() async { // final SharedPreferences prefs = await SharedPreferences.getInstance(); // final String? token = prefs.getString('enrollToken'); @@ -321,11 +326,12 @@ class _addOnsDetailsState extends State { setState(() { gpaPolicies = response['data']; for (var item in gpaPolicies) { - if (item['is_premium_summery'] == "1") { - gpahasPremiumSummary = true; - break; - } - // Extract disclaimer value from each object + if (isPremiumEnabled(item['is_premium_summery'])) { + gpahasPremiumSummary = true; + print('gpahasPremiumSummary $gpahasPremiumSummary'); + break; + } + // Extract disclaimer value from each object if (item['OpenForEnrollment'] == '1') { dynamic disclaimer = item['disclaimer']; if (disclaimer != null && disclaimer.isNotEmpty) { @@ -402,10 +408,9 @@ class _addOnsDetailsState extends State { gmcPolicies = response['data']; for (var item in gmcPolicies) { print('checking is_premium_summery ${item['is_premium_summery']}'); - if (item['is_premium_summery'] == "1") { - print('checking is_premium_summery ${item['is_premium_summery']}'); + if (isPremiumEnabled(item['is_premium_summery'])) { gmchasPremiumSummary = true; - print('gmchasPremiumSummary ${gmchasPremiumSummary}'); + print('gmchasPremiumSummary $gmchasPremiumSummary'); break; } if (item['OpenForEnrollment'] == '1') { @@ -525,7 +530,10 @@ class _addOnsDetailsState extends State { topUpSiTotalAmt = topUpSiPremiumValue + topUpSiPremiumGst; - topUpSiPremiumSummery = topUpSiPolicies['gmc_si_topup']['is_premium_summery']; + setState(() { + topUpIsPremiumSummary = isPremiumEnabled(topUpSiPolicies['gmc_si_topup']?['is_premium_summery']); + }); + // topUpSiTotalAmt = (topUpSum as double).toInt(); }); @@ -621,8 +629,11 @@ class _addOnsDetailsState extends State { topUpParentSiTotalAmt = topUpParentSiPremiumValue + topUpParentSiPremiumGst; - topUpParenIsPremiumSummery = topUpSiParentPolicies['gmc_si_parent_topup']['is_premium_summery']; - print('topUpParenIsPremiumSummery $topUpParenIsPremiumSummery'); + setState(() { + topUpParentIsPremiumSummary = isPremiumEnabled(topUpSiParentPolicies['gmc_si_parent_topup']?['is_premium_summery']); + print(topUpParentECardDownload); + }); + }); } @@ -743,8 +754,11 @@ class _addOnsDetailsState extends State { addOnsDependentPolicies['gmc_dependent_addon'] ['eCardDownload']; - addOnsDependentIsPremiumSummery = addOnsDependentPolicies['gmc_dependent_addon']['is_premium_summery']; - print('addOnsDependentIsPremiumSummery $addOnsDependentIsPremiumSummery'); + setState(() { + addOnsDependentIsPremiumSummary = isPremiumEnabled(addOnsDependentPolicies['gmc_dependent_addon']?['is_premium_summery']); + }); + + print('addOnsDependentIsPremiumSummery $addOnsDependentIsPremiumSummary'); addOnsDependentRelationShip = addOnsDependentPolicies['gmc_dependent_addon']['relationship']; // if(addOnsDependentIsPremiumSummery == 1){ @@ -2460,7 +2474,7 @@ class _addOnsDetailsState extends State { if (_addOnsDependentSwitcher) SizedBox(height: 20), if (Responsive.isDesktop(context) && - _addOnsDependentSwitcher && addOnsDependentIsPremiumSummery == '1') + _addOnsDependentSwitcher && addOnsDependentIsPremiumSummary) Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -2585,7 +2599,7 @@ class _addOnsDetailsState extends State { ], ), if (!Responsive.isDesktop(context) && - _addOnsDependentSwitcher == true && addOnsDependentIsPremiumSummery == '1') + _addOnsDependentSwitcher == true && addOnsDependentIsPremiumSummary) Container( child: Column( crossAxisAlignment: @@ -3102,7 +3116,7 @@ class _addOnsDetailsState extends State { if (_topUpSiSwitcher == true) SizedBox(height: 20), if (Responsive.isDesktop(context) && - _topUpSiSwitcher == true && topUpSiPremiumSummery == '1') + _topUpSiSwitcher == true && topUpIsPremiumSummary) Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -3221,7 +3235,7 @@ class _addOnsDetailsState extends State { ], ), if (!Responsive.isDesktop(context) && - _topUpSiSwitcher == true && topUpSiPremiumSummery == '1') + _topUpSiSwitcher == true && topUpIsPremiumSummary) Container( child: Column( crossAxisAlignment: @@ -3738,7 +3752,7 @@ class _addOnsDetailsState extends State { if (_topUpParentSiSwitcher == true) SizedBox(height: 20), if (Responsive.isDesktop(context) && - _topUpParentSiSwitcher == true && topUpParenIsPremiumSummery == '1') + _topUpParentSiSwitcher == true && topUpParentIsPremiumSummary) Row( crossAxisAlignment: CrossAxisAlignment.start, @@ -3857,7 +3871,7 @@ class _addOnsDetailsState extends State { ], ), if (!Responsive.isDesktop(context) && - _topUpParentSiSwitcher == true && topUpParenIsPremiumSummery == '1') + _topUpParentSiSwitcher == true && topUpParentIsPremiumSummary) Container( child: Column( crossAxisAlignment: @@ -5141,6 +5155,11 @@ class _addOnsDetailsState extends State { return 0.0; } + String formatAmount(double value) { + return value % 1 == 0 + ? value.toInt().toString() + : value.toStringAsFixed(2); + } List generateGmcCards(List data) { List cards = []; @@ -5154,13 +5173,15 @@ class _addOnsDetailsState extends State { String gmcNotes = item['notes'] ?? ''; String gmcECardDownload = item['eCardDownload'] ?? ''; - double gmcGstValue = toDoubleSafe(item['family_floaters_of_dependent_and_gst_value']); - double gmcSiPremiumValue = toDoubleSafe(item['family_floaters_of_dependent_and_si_premium_value']); + double gmcGstValue = + double.tryParse(item['family_floaters_of_dependent_and_gst_value']?.toString() ?? '0') ?? 0.0; + double gmcSiPremiumValue = + double.tryParse(item['family_floaters_of_dependent_and_si_premium_value']?.toString() ?? '0') ?? 0.0; - double gmcTotalableValue = gmcSiPremiumValue + gmcGstValue; + double gmcTotalableValue = gmcGstValue + gmcSiPremiumValue; - bool gmcIsValueValid = (gmcSiPremiumValue != 0 && gmcGstValue != 0); + bool gmcIsValueValid = (gmcSiPremiumValue > 0 && gmcGstValue > 0); List gmcMappedFamilyFloaters = item['mapped_family_floaters'] ?? []; @@ -5353,7 +5374,7 @@ class _addOnsDetailsState extends State { ), ), Text( - (gmcSiPremiumValue ?? '').toString(), + formatAmount(gmcSiPremiumValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: Responsive.isDesktop(context) ? 14 : 12, @@ -5379,7 +5400,7 @@ class _addOnsDetailsState extends State { ), ), Text( - (gmcGstValue ?? '').toString(), + formatAmount(gmcGstValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: Responsive.isDesktop(context) ? 14 : 12, @@ -5405,7 +5426,7 @@ class _addOnsDetailsState extends State { ), ), Text( - (gmcTotalableValue ?? '').toString(), + formatAmount(gmcTotalableValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: Responsive.isDesktop(context) ? 14 : 12, @@ -5454,8 +5475,7 @@ class _addOnsDetailsState extends State { CrossAxisAlignment.center, children: [ Text( - (gmcSiPremiumValue ?? '') - .toString(), + formatAmount(gmcSiPremiumValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: Responsive.isDesktop(context) ? 14 : 12, @@ -5499,7 +5519,7 @@ class _addOnsDetailsState extends State { CrossAxisAlignment.center, children: [ Text( - (gmcGstValue ?? '').toString(), + formatAmount(gmcGstValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: Responsive.isDesktop(context) ? 14 : 12, @@ -5543,8 +5563,7 @@ class _addOnsDetailsState extends State { CrossAxisAlignment.center, children: [ Text( - (gmcTotalableValue ?? '') - .toString(), + formatAmount(gmcTotalableValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: Responsive.isDesktop(context) ? 14 : 12, diff --git a/lib/pages/enrollment/empDetails.dart b/lib/pages/enrollment/empDetails.dart index e5385b1..f875bbf 100755 --- a/lib/pages/enrollment/empDetails.dart +++ b/lib/pages/enrollment/empDetails.dart @@ -2216,6 +2216,12 @@ class _empDetailsState extends State { return cards; } + String formatAmount(double value) { + return value % 1 == 0 + ? value.toInt().toString() + : value.toStringAsFixed(2); + } + List generateCards(List data) { List cards = []; @@ -2239,13 +2245,17 @@ class _empDetailsState extends State { print('gmcECardDownload $gmcECardDownload'); bool gmcCopyDependenceDataEnable = item['copy_dependence_data_enable']; print('gmcCopyDependenceDataEnable $gmcCopyDependenceDataEnable'); - double gmcGstValue = item['family_floaters_of_dependent_and_gst_value']; - print('gmcGstValue $gmcGstValue'); - double gmcSiPremiumValue = - item['family_floaters_of_dependent_and_si_premium_value']; - print('gmcSiPremiumValue $gmcSiPremiumValue'); - double gmcTotalableValue = gmcGstValue + gmcSiPremiumValue; - bool gmcIsValueValid = (gmcSiPremiumValue != 0 && gmcGstValue != 0); + // double gmcGstValue = (item['family_floaters_of_dependent_and_gst_value'] ?? 0).toDouble(); + double gmcGstValue = + double.tryParse(item['family_floaters_of_dependent_and_gst_value']?.toString() ?? '0') ?? 0.0; + + double gmcSiPremiumValue = + double.tryParse(item['family_floaters_of_dependent_and_si_premium_value']?.toString() ?? '0') ?? 0.0; + + double gmcTotalableValue = gmcGstValue + gmcSiPremiumValue; + + bool gmcIsValueValid = (gmcSiPremiumValue > 0 && gmcGstValue > 0); + List gmcRelationShip = item['relationship']; List gmcMappedFamilyFloaters = item['mapped_family_floaters']; @@ -2688,7 +2698,7 @@ class _empDetailsState extends State { ), ), Text( - (gmcSiPremiumValue ?? '').toString(), + formatAmount(gmcSiPremiumValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: 18, @@ -2713,7 +2723,7 @@ class _empDetailsState extends State { ), ), Text( - (gmcGstValue ?? '').toString(), + formatAmount(gmcGstValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: 18, @@ -2738,7 +2748,7 @@ class _empDetailsState extends State { ), ), Text( - (gmcTotalableValue ?? '').toString(), + formatAmount(gmcTotalableValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: 18, @@ -2787,7 +2797,7 @@ class _empDetailsState extends State { CrossAxisAlignment.center, children: [ Text( - (gmcSiPremiumValue ?? '').toString(), + formatAmount(gmcSiPremiumValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: 16, @@ -2831,7 +2841,7 @@ class _empDetailsState extends State { CrossAxisAlignment.center, children: [ Text( - (gmcGstValue ?? '').toString(), + formatAmount(gmcGstValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: 16, @@ -2875,7 +2885,7 @@ class _empDetailsState extends State { CrossAxisAlignment.center, children: [ Text( - (gmcTotalableValue ?? '').toString(), + formatAmount(gmcTotalableValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: 16, @@ -2896,7 +2906,7 @@ class _empDetailsState extends State { return cards; } - Future copyPreviousPolicy(gmcMappedFamilyFloaters,gmcClientPolicyId,sumInsured) async { + Future copyPreviousPolicy(gmcMappedFamilyFloaters,gmcClientPolicyId,sumInsured) async { print('gmcClientPolicyId1234 $gmcClientPolicyId'); try { final response = await apiService.copyActivePolicy(enrollmentClient_id,enrollmentEmpCodeString,gmcClientPolicyId); diff --git a/lib/pages/enrollment/empReview.dart b/lib/pages/enrollment/empReview.dart index 0d69bf6..27f7afd 100755 --- a/lib/pages/enrollment/empReview.dart +++ b/lib/pages/enrollment/empReview.dart @@ -112,7 +112,7 @@ class _empReviewDetailsState extends State { dynamic topUpSumInsured; dynamic topUpFloaterTextHeading; dynamic topUpECardDownload; - dynamic topUpIsPremiumSummary; + bool topUpIsPremiumSummary = false; dynamic topUpDisclaimer; int showHideTopUpCard = 0; int showHideAddOnsCard = 0; @@ -126,7 +126,7 @@ class _empReviewDetailsState extends State { dynamic topUpParentFamilyFloater; dynamic topUpParentMappedFamilyFloatersSi; dynamic topUpParentECardDownload; - dynamic topUpParentIsPremiumSummary; + bool topUpParentIsPremiumSummary = false; dynamic topUpParentSiValue; dynamic topUpParentSiSelectedSI; dynamic topUpParentTypeName; @@ -144,7 +144,7 @@ class _empReviewDetailsState extends State { dynamic topUpOpenForEnrollment; dynamic topUpParentOpenForEnrollment; dynamic addOnsDependentOpenForEnrollment; - dynamic addOnsDependentIsPremiumSummary; + bool addOnsDependentIsPremiumSummary = false; bool gmcEnrollmentStatus = false; bool gpahasPremiumSummary = false; bool gmchasPremiumSummary = false; @@ -263,6 +263,11 @@ class _empReviewDetailsState extends State { // } // } + bool isPremiumEnabled(dynamic value) { + final intValue = int.tryParse(value?.toString() ?? '0') ?? 0; + return intValue != 0; + } + void primarySummary() async { final SharedPreferences prefs = await SharedPreferences.getInstance(); if (prefs.containsKey('siData')) { @@ -409,8 +414,9 @@ class _empReviewDetailsState extends State { print('gpaPolicies'); for (var policy in gpaPolicies) { - if (policy['is_premium_summery'] == "1") { + if (isPremiumEnabled(policy['is_premium_summery'])) { gpahasPremiumSummary = true; + print('gpahasPremiumSummary $gpahasPremiumSummary'); break; } } @@ -494,11 +500,9 @@ class _empReviewDetailsState extends State { print('gmcPolicies $gmcPolicies'); for (var policy in gmcPolicies) { - print('checking is_premium_summery ${policy['is_premium_summery']}'); - if (policy['is_premium_summery'] == "1") { - print('checking is_premium_summery ${policy['is_premium_summery']}'); + if (isPremiumEnabled(policy['is_premium_summery'])) { gmchasPremiumSummary = true; - print('gmchasPremiumSummary ${gmchasPremiumSummary}'); + print('gmchasPremiumSummary $gmchasPremiumSummary'); break; } } @@ -615,10 +619,11 @@ class _empReviewDetailsState extends State { topUpSiPolicies['gmc_si_topup']['eCardDownload']; setState(() { - topUpIsPremiumSummary = - topUpSiPolicies['gmc_si_topup']['is_premium_summery']; + topUpIsPremiumSummary = isPremiumEnabled(topUpSiPolicies['gmc_si_topup']?['is_premium_summery']); }); + + // if(topUpIsPremiumSummary == '1'){ // tabHide = '0'; // } @@ -739,12 +744,12 @@ class _empReviewDetailsState extends State { topUpParentECardDownload = topUpSiParentPolicies['gmc_si_parent_topup']['eCardDownload']; - setState(() { - topUpParentIsPremiumSummary = - topUpSiParentPolicies['gmc_si_parent_topup'] - ['is_premium_summery']; - print(topUpParentECardDownload); - }); + setState(() { + topUpParentIsPremiumSummary = isPremiumEnabled(topUpSiParentPolicies['gmc_si_parent_topup']?['is_premium_summery']); + print(topUpParentECardDownload); + }); + + // if(topUpParentIsPremiumSummary == '1'){ // tabHide = '0'; @@ -918,11 +923,11 @@ class _empReviewDetailsState extends State { await addOnsDependentPolicies['gmc_dependent_addon'] ['OpenForEnrollment']; - setState(() { - addOnsDependentIsPremiumSummary = - addOnsDependentPolicies['gmc_dependent_addon'] - ['is_premium_summery']; - }); +setState(() { + addOnsDependentIsPremiumSummary = isPremiumEnabled(addOnsDependentPolicies['gmc_dependent_addon']?['is_premium_summery']); +}); + + // if(addOnsDependentIsPremiumSummary == '1'){ // tabHide = '0'; @@ -1615,11 +1620,11 @@ class _empReviewDetailsState extends State { ), ), SizedBox(height: 16), - if (gpahasPremiumSummary == true || - gmchasPremiumSummary == true || - topUpIsPremiumSummary == '1' || - topUpParentIsPremiumSummary == '1' || - addOnsDependentIsPremiumSummary == '1') + if (gpahasPremiumSummary || + gmchasPremiumSummary || + topUpIsPremiumSummary || + topUpParentIsPremiumSummary || + addOnsDependentIsPremiumSummary)...[ Card( elevation: 0, color: Colors.white, @@ -1628,7 +1633,7 @@ class _empReviewDetailsState extends State { padding: Responsive.isDesktop(context) ? EdgeInsets.all(30) : EdgeInsets.all( - 10), // Add padding to the container + 10), // Add padding to the container child: Column(children: [ Row( children: [ @@ -1638,24 +1643,24 @@ class _empReviewDetailsState extends State { alignment: Alignment.centerLeft, child: Column( mainAxisAlignment: - MainAxisAlignment.start, + MainAxisAlignment.start, crossAxisAlignment: - CrossAxisAlignment.start, + CrossAxisAlignment.start, children: [ Text( 'Review', textAlign: TextAlign.left, style: - GoogleFonts.poppins( + GoogleFonts.poppins( fontSize: Responsive - .isDesktop( - context) + .isDesktop( + context) ? 20 : 18, color: - Color(0xFF181818), + Color(0xFF181818), fontWeight: - FontWeight.w600, + FontWeight.w600, ), ), ], @@ -1670,22 +1675,22 @@ class _empReviewDetailsState extends State { alignment: Alignment.centerLeft, child: Column( mainAxisAlignment: - MainAxisAlignment.start, + MainAxisAlignment.start, crossAxisAlignment: - CrossAxisAlignment.start, + CrossAxisAlignment.start, children: [ Text( 'Total Payable', textAlign: TextAlign.left, style: - GoogleFonts.poppins( + GoogleFonts.poppins( fontSize: Responsive - .isDesktop( - context) + .isDesktop( + context) ? 18 : 16, color: - Color(0xFF181818), + Color(0xFF181818), ), ), ], @@ -1694,27 +1699,27 @@ class _empReviewDetailsState extends State { flex: 6, child: Container( alignment: - Alignment.centerRight, + Alignment.centerRight, child: Column( mainAxisAlignment: - MainAxisAlignment.start, + MainAxisAlignment.start, crossAxisAlignment: - CrossAxisAlignment.start, + CrossAxisAlignment.start, children: [ Text( '₹${allTotalSum()}/Year', textAlign: TextAlign.left, style: - GoogleFonts.poppins( + GoogleFonts.poppins( fontSize: Responsive - .isDesktop( - context) + .isDesktop( + context) ? 22 : 18, color: - Color(0xFFE26728), + Color(0xFFE26728), fontWeight: - FontWeight.w500, + FontWeight.w500, ), ), ], @@ -1723,12 +1728,9 @@ class _empReviewDetailsState extends State { ), ])), ), - if (gpahasPremiumSummary == true || - gmchasPremiumSummary == true || - topUpIsPremiumSummary == '1' || - topUpParentIsPremiumSummary == '1' || - addOnsDependentIsPremiumSummary == '1') SizedBox(height: 16), + ], + if (gpaPolicies != null && gpaPolicies.length > 0) Column( crossAxisAlignment: CrossAxisAlignment.stretch, @@ -2537,44 +2539,44 @@ class _empReviewDetailsState extends State { : EdgeInsets.all(10), child: Column( children: [ - if (gpahasPremiumSummary == true || - gmchasPremiumSummary == true || - topUpIsPremiumSummary == '1' || - topUpParentIsPremiumSummary == '1' || - addOnsDependentIsPremiumSummary == '1') + if (gpahasPremiumSummary || + gmchasPremiumSummary || + topUpIsPremiumSummary || + topUpParentIsPremiumSummary || + addOnsDependentIsPremiumSummary)...[ Container( child: Row( crossAxisAlignment: - CrossAxisAlignment.start, + CrossAxisAlignment.start, children: [ Expanded( flex: 12, child: Container( alignment: - Alignment.centerLeft, + Alignment.centerLeft, child: Column( mainAxisAlignment: - MainAxisAlignment - .start, + MainAxisAlignment + .start, crossAxisAlignment: - CrossAxisAlignment - .start, + CrossAxisAlignment + .start, children: [ Text( 'Premium Summary', textAlign: - TextAlign.left, + TextAlign.left, style: GoogleFonts .poppins( fontSize: Responsive - .isDesktop( - context) + .isDesktop( + context) ? 18 : 16, color: Color( 0xFF181818), fontWeight: - FontWeight.w600, + FontWeight.w600, ), ), ], @@ -2582,464 +2584,450 @@ class _empReviewDetailsState extends State { ], ), ), - SizedBox(height: 15), - 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), - 2: FlexColumnWidth( - 2), // Adjust column width as needed - 3: FlexColumnWidth(2), - }, - children: [ - if (gpahasPremiumSummary == true || - gmchasPremiumSummary == - true || - topUpIsPremiumSummary == - '1' || - topUpParentIsPremiumSummary == - '1' || - addOnsDependentIsPremiumSummary == - '1') - TableRow( - children: [ - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - 'Policy ', - textAlign: - TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 16 - : 14, - fontWeight: - FontWeight - .bold), - ), - ), - ), - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - 'Additional Premium', - textAlign: - TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 16 - : 14, - fontWeight: - FontWeight - .bold), - ), - ), - ), - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - 'GST', - textAlign: - TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 16 - : 14, - fontWeight: - FontWeight - .bold), - ), - ), - ), - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - 'Total', - textAlign: - TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 16 - : 14, - fontWeight: - FontWeight - .bold), - ), - ), - ), - ], - ), - if (gpaPolicies != null && - gpaPolicies.length > 0) - ...gpaBuildPolicyRows( - gpaPolicies, context), - if (gmcPolicies != null && - gmcPolicies.length > 0) - ...gmcBuildPolicyRows( - gmcPolicies, context), - if (activeSiData == 1 && - topUpIsPremiumSummary == - '1') - TableRow( - children: [ - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - (Responsive.isDesktop( - context) - ? (topUpPolicyName ?? - 'Default Top Up Name') - : 'GMC - Top Up'), - textAlign: - TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 14 - : 12), - ), - ), - ), - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - '₹$topUpSiPremiumValue/Year', - textAlign: Responsive - .isDesktop( - context) - ? TextAlign - .start - : TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 14 - : 12), - ), - ), - ), - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - '₹$topUpSiPremiumGst/-', - textAlign: Responsive - .isDesktop( - context) - ? TextAlign - .start - : TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 14 - : 12), - ), - ), - ), - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - '₹$topUpSiTotalAmt/Year', - textAlign: Responsive - .isDesktop( - context) - ? TextAlign - .start - : TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 14 - : 12), - ), - ), - ), - ], - ), - if (activeSiParentData == - 1 && - topUpParentIsPremiumSummary == - '1') - TableRow( - children: [ - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - (Responsive.isDesktop( - context) - ? (topUpParentPolicyName ?? - 'Default Parent Top Up Name') - : 'GMC - Parents Top Up'), - textAlign: - TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 14 - : 12), - ), - ), - ), - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - '₹$topUpParentSiPremiumValue/Year', - textAlign: Responsive - .isDesktop( - context) - ? TextAlign - .start - : TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 14 - : 12), - ), - ), - ), - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - '₹$topUpParentSiPremiumGst/-', - textAlign: Responsive - .isDesktop( - context) - ? TextAlign - .start - : TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 14 - : 12), - ), - ), - ), - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - '₹$topUpParentSiTotalAmt/Year', - textAlign: Responsive - .isDesktop( - context) - ? TextAlign - .start - : TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 14 - : 12), - ), - ), - ), - ], - ), - if (activeDependentData == - 1 && - addOnsDependentIsPremiumSummary == - '1') - TableRow( - children: [ - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - Responsive.isDesktop( - context) - ? (addOnsDependentPolicyName ?? - 'Default Add Dependent Up Name') - : 'GMC - Dependent', - textAlign: - TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 14 - : 12), - ), - ), - ), - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - '₹$addOnDependentPremiumValue/Year', - textAlign: Responsive - .isDesktop( - context) - ? TextAlign - .start - : TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 14 - : 12), - ), - ), - ), - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - '₹$addOnsDependentPremiumGst/-', - textAlign: Responsive - .isDesktop( - context) - ? TextAlign - .start - : TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 14 - : 12), - ), - ), - ), - TableCell( - child: Padding( - padding: - EdgeInsets - .all(8.0), - child: Text( - '₹$addOnsDependentTotalAmt/Year', - textAlign: Responsive - .isDesktop( - context) - ? TextAlign - .start - : TextAlign - .start, - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) - ? 14 - : 12), - ), - ), - ), - ], - ), - ], - ), - )) - ], - ), - ), - SizedBox(height: 10), - if (gpahasPremiumSummary == true || - gmchasPremiumSummary == true || - topUpIsPremiumSummary == '1' || - topUpParentIsPremiumSummary == '1' || - addOnsDependentIsPremiumSummary == '1') + SizedBox(height: 15), Container( child: Row( crossAxisAlignment: - CrossAxisAlignment.start, + 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), + 2: FlexColumnWidth( + 2), // Adjust column width as needed + 3: FlexColumnWidth(2), + }, + children: [ + TableRow( + children: [ + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + 'Policy ', + textAlign: + TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 16 + : 14, + fontWeight: + FontWeight + .bold), + ), + ), + ), + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + 'Additional Premium', + textAlign: + TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 16 + : 14, + fontWeight: + FontWeight + .bold), + ), + ), + ), + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + 'GST', + textAlign: + TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 16 + : 14, + fontWeight: + FontWeight + .bold), + ), + ), + ), + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + 'Total', + textAlign: + TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 16 + : 14, + fontWeight: + FontWeight + .bold), + ), + ), + ), + ], + ), + if (gpaPolicies != null && + gpaPolicies.length > 0) + ...gpaBuildPolicyRows( + gpaPolicies, context), + if (gmcPolicies != null && + gmcPolicies.length > 0) + ...gmcBuildPolicyRows( + gmcPolicies, context), + if (activeSiData == 1 && + topUpIsPremiumSummary == + '1') + TableRow( + children: [ + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + (Responsive.isDesktop( + context) + ? (topUpPolicyName ?? + 'Default Top Up Name') + : 'GMC - Top Up'), + textAlign: + TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 14 + : 12), + ), + ), + ), + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + '₹$topUpSiPremiumValue/Year', + textAlign: Responsive + .isDesktop( + context) + ? TextAlign + .start + : TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 14 + : 12), + ), + ), + ), + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + '₹$topUpSiPremiumGst/-', + textAlign: Responsive + .isDesktop( + context) + ? TextAlign + .start + : TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 14 + : 12), + ), + ), + ), + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + '₹$topUpSiTotalAmt/Year', + textAlign: Responsive + .isDesktop( + context) + ? TextAlign + .start + : TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 14 + : 12), + ), + ), + ), + ], + ), + if (activeSiParentData == + 1 && + topUpParentIsPremiumSummary == + '1') + TableRow( + children: [ + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + (Responsive.isDesktop( + context) + ? (topUpParentPolicyName ?? + 'Default Parent Top Up Name') + : 'GMC - Parents Top Up'), + textAlign: + TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 14 + : 12), + ), + ), + ), + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + '₹$topUpParentSiPremiumValue/Year', + textAlign: Responsive + .isDesktop( + context) + ? TextAlign + .start + : TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 14 + : 12), + ), + ), + ), + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + '₹$topUpParentSiPremiumGst/-', + textAlign: Responsive + .isDesktop( + context) + ? TextAlign + .start + : TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 14 + : 12), + ), + ), + ), + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + '₹$topUpParentSiTotalAmt/Year', + textAlign: Responsive + .isDesktop( + context) + ? TextAlign + .start + : TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 14 + : 12), + ), + ), + ), + ], + ), + if (activeDependentData == + 1 && + addOnsDependentIsPremiumSummary == + '1') + TableRow( + children: [ + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + Responsive.isDesktop( + context) + ? (addOnsDependentPolicyName ?? + 'Default Add Dependent Up Name') + : 'GMC - Dependent', + textAlign: + TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 14 + : 12), + ), + ), + ), + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + '₹$addOnDependentPremiumValue/Year', + textAlign: Responsive + .isDesktop( + context) + ? TextAlign + .start + : TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 14 + : 12), + ), + ), + ), + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + '₹$addOnsDependentPremiumGst/-', + textAlign: Responsive + .isDesktop( + context) + ? TextAlign + .start + : TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 14 + : 12), + ), + ), + ), + TableCell( + child: Padding( + padding: + EdgeInsets + .all(8.0), + child: Text( + '₹$addOnsDependentTotalAmt/Year', + textAlign: Responsive + .isDesktop( + context) + ? TextAlign + .start + : TextAlign + .start, + style: GoogleFonts.poppins( + fontSize: + Responsive.isDesktop(context) + ? 14 + : 12), + ), + ), + ), + ], + ), + ], + ), + )) + ], + ), + ), + SizedBox(height: 10), + Container( + child: Row( + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Expanded( flex: 6, child: Container( alignment: - Alignment.centerLeft, + Alignment.centerLeft, child: Column( mainAxisAlignment: - MainAxisAlignment - .start, + MainAxisAlignment + .start, crossAxisAlignment: - CrossAxisAlignment - .start, + CrossAxisAlignment + .start, children: [ Text( 'Total Payable', textAlign: - TextAlign.left, + TextAlign.left, style: GoogleFonts .poppins( fontSize: Responsive - .isDesktop( - context) + .isDesktop( + context) ? 20 : 16, color: Color( 0xFF181818), fontWeight: - FontWeight.w600, + FontWeight.w600, ), ), ], @@ -3048,29 +3036,29 @@ class _empReviewDetailsState extends State { flex: 6, child: Container( alignment: - Alignment.centerRight, + Alignment.centerRight, child: Column( mainAxisAlignment: - MainAxisAlignment.end, + MainAxisAlignment.end, crossAxisAlignment: - CrossAxisAlignment - .end, + CrossAxisAlignment + .end, children: [ Text( '₹${allTotalSum()}/Year', textAlign: - TextAlign.right, + TextAlign.right, style: GoogleFonts .poppins( fontSize: Responsive - .isDesktop( - context) + .isDesktop( + context) ? 18 : 16, color: Color( 0xFFE26728), fontWeight: - FontWeight.w500, + FontWeight.w500, ), ), ], @@ -3078,7 +3066,11 @@ class _empReviewDetailsState extends State { ], ), ), - SizedBox(height: 15), + SizedBox(height: 15), + ], + + + Container( alignment: Alignment.topLeft, child: Row( @@ -3766,11 +3758,11 @@ class _empReviewDetailsState extends State { ))), ], ), - if (gpahasPremiumSummary == true || - gmchasPremiumSummary == true || - topUpIsPremiumSummary == '1' || - topUpParentIsPremiumSummary == '1' || - addOnsDependentIsPremiumSummary == '1') + if (gpahasPremiumSummary || + gmchasPremiumSummary || + topUpIsPremiumSummary || + topUpParentIsPremiumSummary || + addOnsDependentIsPremiumSummary) Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -3827,6 +3819,12 @@ class _empReviewDetailsState extends State { return cards; } + String formatAmount(double value) { + return value % 1 == 0 + ? value.toInt().toString() + : value.toStringAsFixed(2); + } + List generateGmcCards(List data) { List cards = []; // gmcEnrollmentStatus = isEnrollmentOpen(data); @@ -3854,12 +3852,15 @@ class _empReviewDetailsState extends State { // ------------------------------- // SAFE numeric conversion // ------------------------------- - double gmcGstValue = toDoubleSafe(item['family_floaters_of_dependent_and_gst_value']); - double gmcSiPremiumValue = toDoubleSafe(item['family_floaters_of_dependent_and_si_premium_value']); + double gmcGstValue = + double.tryParse(item['family_floaters_of_dependent_and_gst_value']?.toString() ?? '0') ?? 0.0; - double gmcTotalableValue = gmcSiPremiumValue + gmcGstValue; + double gmcSiPremiumValue = + double.tryParse(item['family_floaters_of_dependent_and_si_premium_value']?.toString() ?? '0') ?? 0.0; - bool gmcIsValueValid = (gmcSiPremiumValue != 0 && gmcGstValue != 0); + double gmcTotalableValue = gmcGstValue + gmcSiPremiumValue; + + bool gmcIsValueValid = (gmcSiPremiumValue > 0 && gmcGstValue > 0); // ------------------------------- // SAFE list handling @@ -4068,7 +4069,7 @@ class _empReviewDetailsState extends State { ), ), Text( - (gmcSiPremiumValue ?? '').toString(), + formatAmount(gmcSiPremiumValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: 18, @@ -4094,7 +4095,7 @@ class _empReviewDetailsState extends State { ), ), Text( - (gmcGstValue ?? '').toString(), + formatAmount(gmcGstValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: 18, @@ -4120,7 +4121,7 @@ class _empReviewDetailsState extends State { ), ), Text( - (gmcTotalableValue ?? '').toString(), + formatAmount(gmcTotalableValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: 18, @@ -4171,8 +4172,7 @@ class _empReviewDetailsState extends State { CrossAxisAlignment.center, children: [ Text( - (gmcSiPremiumValue ?? '') - .toString(), + formatAmount(gmcSiPremiumValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: 16, @@ -4216,7 +4216,7 @@ class _empReviewDetailsState extends State { CrossAxisAlignment.center, children: [ Text( - (gmcGstValue ?? '').toString(), + formatAmount(gmcGstValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: 16, @@ -4260,8 +4260,7 @@ class _empReviewDetailsState extends State { CrossAxisAlignment.center, children: [ Text( - (gmcTotalableValue ?? '') - .toString(), + formatAmount(gmcTotalableValue), textAlign: TextAlign.start, style: GoogleFonts.poppins( fontSize: 16, diff --git a/lib/pages/postEnrollment/claims.dart b/lib/pages/postEnrollment/claims.dart index b5df959..8f97935 100755 --- a/lib/pages/postEnrollment/claims.dart +++ b/lib/pages/postEnrollment/claims.dart @@ -583,8 +583,8 @@ class _claimsState extends State { horizontal: Responsive .isDesktop( context) - ? 140 - : 10 , + ? 70 + : 30 , vertical: Responsive .isDesktop( context) @@ -654,7 +654,7 @@ class _claimsState extends State { horizontal: Responsive .isDesktop( context) - ? 130 + ? 70 : 30, vertical: Responsive .isDesktop( diff --git a/lib/pages/postEnrollment/help.dart b/lib/pages/postEnrollment/help.dart index d901fb7..8df68db 100755 --- a/lib/pages/postEnrollment/help.dart +++ b/lib/pages/postEnrollment/help.dart @@ -192,7 +192,8 @@ class _helpState extends State { isLoading = true; }); print('check 1'); - final response = await apiService.getTrackClaimsList(empPrimaryId!,empMobileNo,empEmailID); + final response = await apiService.getTrackClaimsList( + empPrimaryId!, empMobileNo, empEmailID); print('check 2'); setState(() { isLoading = false; @@ -582,90 +583,34 @@ class _helpState extends State { ), ), - SizedBox(height: 20), + SizedBox(height: 5), - InkWell( - onTap: () { - context.go('/faqs'); - }, - child: Container( - width: double.infinity, - height: Responsive.isDesktop(context) ? 140 : 120, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6), - border: Border.all( - color: const Color(0xFF2F80ED), - width: 2, + Container( + // width: Responsive.isDesktop(context) ? 500 : double.infinity, + // height: 75, + // padding: Responsive.isDesktop(context) + // ? const EdgeInsets.only( + // top: 0, bottom: 20, left: 30, right: 30) + // : const EdgeInsets.symmetric(vertical: 0, horizontal: 0), + child: InkWell( + onTap: () { + context.push('/faqs'); + }, + child: Text( + 'Click to find answers to commonly\nasked questions', + maxLines: 2, + softWrap: true, + textAlign: TextAlign.center, + style: GoogleFonts.poppins( + fontSize: Responsive.isDesktop(context) ? 12 : 10, + fontWeight: FontWeight.w600, + color: Colors.grey, + // decoration: TextDecoration.underline, + // decorationThickness: 1, ), ), - child: Row( - children: [ - /// LEFT IMAGE BLOCK - Container( - width: Responsive.isDesktop(context) ? 180 : 120, - height: double.infinity, - color: Colors.white, - padding: const EdgeInsets.all(12), - child: Image.asset( - 'assets/faqs.jpg', - fit: BoxFit.contain, - ), - ), - - /// RIGHT CONTENT BLOCK - Expanded( - child: Container( - color: const Color(0xFF93C01F), - padding: EdgeInsets.symmetric( - horizontal: Responsive.isDesktop(context) ? 32 : 16, - vertical: Responsive.isDesktop(context) ? 24 : 16, - ), - child: Row( - children: [ - /// TEXT CONTENT - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'FAQs', - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) ? 36 : 20, - fontWeight: FontWeight.w600, - color: Colors.white, - ), - ), - const SizedBox(height: 8), - Text( - 'Find answers to commonly asked questions', - style: GoogleFonts.poppins( - fontSize: - Responsive.isDesktop(context) ? 18 : 14, - fontWeight: FontWeight.w400, - color: Colors.white, - ), - ), - ], - ), - ), - - /// RIGHT ARROW - Icon( - Icons.chevron_right, - size: Responsive.isDesktop(context) ? 36 : 28, - color: Colors.white, - ), - ], - ), - ), - ), - ], - ), ), - ), - + ) // SizedBox(height: 15), // Container( @@ -1129,42 +1074,42 @@ class _helpState extends State { : FloatingActionButtonLocation.miniEndFloat, bottomNavigationBar: Responsive.isDesktop(context) ? null - : CustomBottomNavigationBar( - onTabChanged: (index) { - // Add your navigation logic here - // repositionBotman(); - if (index == 0) { - context.push('/home'); - } else if (index == 1) { - context.push('/claims'); - } else if (index == 2) { - context.push('/faqs'); - } else if (index == 3) { - context.push('/profile'); - } else if (index == 4) { - context.push('/help'); - } - // else if (index == 4) { - // // context.push('/wellness'); - // // Wellness tab clicked → show popup - // if(!isRetailLoggedIn) - // PopupHelper.showRedirectPopup( - // context: context, - // apiService: apiService, - // empPrimaryId: session.empPrimaryId, - // ); - // } - }, - icons: [ - Icons.home_outlined, - Icons.sticky_note_2_outlined, - Icons.question_answer_outlined, - Icons.person_outline_outlined, - Icons.headset_mic_outlined, - ], - labels: ["Home", "Claims", "FAQs", "Profile","Help"], - initialIndex: 4, // Initial index of the bottom navigation bar - ), + : CustomBottomNavigationBar( + onTabChanged: (index) { + // Add your navigation logic here + // repositionBotman(); + if (index == 0) { + context.push('/home'); + } else if (index == 1) { + context.push('/claims'); + } else if (index == 2) { + context.push('/faqs'); + } else if (index == 3) { + context.push('/profile'); + } else if (index == 4) { + context.push('/help'); + } + // else if (index == 4) { + // // context.push('/wellness'); + // // Wellness tab clicked → show popup + // if(!isRetailLoggedIn) + // PopupHelper.showRedirectPopup( + // context: context, + // apiService: apiService, + // empPrimaryId: session.empPrimaryId, + // ); + // } + }, + icons: [ + Icons.home_outlined, + Icons.sticky_note_2_outlined, + Icons.question_answer_outlined, + Icons.person_outline_outlined, + Icons.headset_mic_outlined, + ], + labels: ["Home", "Claims", "FAQs", "Profile", "Help"], + initialIndex: 4, // Initial index of the bottom navigation bar + ), )); } diff --git a/lib/pages/postEnrollment/planclaimsform.dart b/lib/pages/postEnrollment/planclaimsform.dart index ac2043c..a50fd89 100755 --- a/lib/pages/postEnrollment/planclaimsform.dart +++ b/lib/pages/postEnrollment/planclaimsform.dart @@ -26,6 +26,7 @@ import '../service/TokenService.dart'; import '../service/popup_helper.dart'; import 'package:pdf/widgets.dart' as pw; import 'package:printing/printing.dart'; +import 'package:flutter/services.dart'; class planclaimsform extends StatefulWidget { final Map? details; @@ -386,7 +387,7 @@ class _planclaimsformState extends State { client_policy_id = null; }); print('1111 serviceId : $serviceId'); - if (serviceId == 1 || serviceId == 2 || serviceId == 3 || serviceId == 4) { + if (serviceId == 1 || serviceId == 2 || serviceId == 3 || serviceId == 4 || serviceId == 72) { print('2222'); // Filter policies based on the ticket_type_id List> filteredPolicies = policyList.where((policy) { @@ -541,15 +542,15 @@ class _planclaimsformState extends State { isPolicyValid = policyNumberId != null; isMemberValid = selectedMemberId != null; isSubjectValid = subjectController.text.trim().isNotEmpty; - isHospitalNameValid = policyTypeCondition != 1 || hospitalNameController.text.trim().isNotEmpty; - isHospitalAddressValid = policyTypeCondition != 1 || hospitalAddressController.text.trim().isNotEmpty; - isHospitalStateValid = policyTypeCondition != 1 || hospitalStateController.text.trim().isNotEmpty; - isHospitalCityValid = policyTypeCondition != 1 || hospitalCityController.text.trim().isNotEmpty; - isHospitalPincodeValid = policyTypeCondition != 1 || hospitalPinCodeController.text.trim().isNotEmpty; - isHospitalPhoneNoValid = policyTypeCondition != 1 || hospitalPhoneNoController.text.trim().isNotEmpty; + isHospitalNameValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || hospitalNameController.text.trim().isNotEmpty; + isHospitalAddressValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || hospitalAddressController.text.trim().isNotEmpty; + isHospitalStateValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || hospitalStateController.text.trim().isNotEmpty; + isHospitalCityValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || hospitalCityController.text.trim().isNotEmpty; + isHospitalPincodeValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || hospitalPinCodeController.text.trim().isNotEmpty; + isHospitalPhoneNoValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || hospitalPhoneNoController.text.trim().isNotEmpty; // isAdmitDischargeValid = policyTypeCondition != 1 || (admitDate != null && dischargeDate != null); - isAdmitDateValid = policyTypeCondition != 1 || admitDate != null; - isDischargeDateValid = policyTypeCondition != 1 || dischargeDate != null; + isAdmitDateValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || admitDate != null; + isDischargeDateValid = (policyTypeCondition != 1 && policyTypeCondition != 72) || dischargeDate != null; isClaimAmountValid = serviceId != 1 || claimAmountController.text.trim().isNotEmpty; isAccidentDateValid = (serviceId == 2 || serviceId == 3 || serviceId == 4) ? accidentDate != null : true; isIntimationDateValid = (serviceId == 2 || serviceId == 3 || serviceId == 4) ? intimationDate != null : true; @@ -618,7 +619,7 @@ class _planclaimsformState extends State { }; - if (policyTypeCondition == 1) { + if (policyTypeCondition == 1 || policyTypeCondition == 72) { String formattedAdmitDate = DateFormat('yyyy-MM-dd').format(admitDate!); String formattedDischargeDate = DateFormat('yyyy-MM-dd').format(dischargeDate!); fields['hospital_name'] = hospitalNameController.text; @@ -767,11 +768,17 @@ class _planclaimsformState extends State { print('Form data submitted successfully'); fileService.clearAll(); } else { + setState(() { + isLoading = false; + }); ToastHelper.showErrorToast(context, "Failed: ${decoded['message']}"); } } catch (e) { + setState(() { + isLoading = false; + }); print('Error submitting form data: $e'); } } @@ -1197,7 +1204,7 @@ SizedBox(height: 15), // 'Accident Details', // accidentDetailsController), SizedBox(height: 15), - if (policyTypeCondition == 1) ...[ + if (policyTypeCondition == 1 || policyTypeCondition == 72) ...[ buildTextField('Hospital Name', hospitalNameController), if (!isHospitalNameValid) Text('Please enter the Hospital Name', style: TextStyle(color: Colors.red)), @@ -1214,11 +1221,19 @@ SizedBox(height: 15), if (!isHospitalStateValid) Text('Please enter the Hospital State', style: TextStyle(color: Colors.red)), SizedBox(height: 15), - buildTextField('Hospital Pincode', hospitalPinCodeController), + buildTextField('Hospital Pincode', hospitalPinCodeController,keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + LengthLimitingTextInputFormatter(6), // optional + ]), if (!isHospitalPincodeValid) Text('Please enter the Hospital Pincode', style: TextStyle(color: Colors.red)), SizedBox(height: 15), - buildTextField('Hospital Phone No', hospitalPhoneNoController), + buildTextField('Hospital Phone No', hospitalPhoneNoController,keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + LengthLimitingTextInputFormatter(10), // optional + ]), if (!isHospitalPhoneNoValid) Text('Please enter the Hospital Phone No', style: TextStyle(color: Colors.red)), ], @@ -1295,7 +1310,7 @@ SizedBox(height: 15), // 'Accident Details', // accidentDetailsController), // SizedBox(height: 15), - if (policyTypeCondition == 1) ...[ + if (policyTypeCondition == 1 || policyTypeCondition == 72) ...[ // 🟡 Admit Date — no future allowed buildDatePickerField( label: 'Admit Date', @@ -1334,7 +1349,10 @@ SizedBox(height: 15), SizedBox(height: 15), if (serviceId == 1) ...[ - buildTextField('Claims Amount', claimAmountController, TextInputType.number), + buildTextField('Claims Amount', claimAmountController, keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ]), if (!isClaimAmountValid) Text('Please enter the Claims Amount', style: TextStyle(color: Colors.red)), ], @@ -1346,7 +1364,10 @@ SizedBox(height: 15), buildTextField( 'Sum Insured', sumInsuredController, - TextInputType.number, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.digitsOnly, + ], ), ] ), @@ -1495,12 +1516,18 @@ SizedBox(height: 15), ); } - Widget buildTextField(String label, TextEditingController controller, - [TextInputType keyboardType = TextInputType.text]) { + + Widget buildTextField( + String label, + TextEditingController controller, { + TextInputType keyboardType = TextInputType.text, + List? inputFormatters, + }) { return TextFormField( controller: controller, - decoration: InputDecoration(labelText: label), keyboardType: keyboardType, + inputFormatters: inputFormatters, + decoration: InputDecoration(labelText: label), validator: (value) { if (value == null || value.isEmpty) { return 'Please enter the $label'; @@ -1510,6 +1537,7 @@ SizedBox(height: 15), ); } + Widget buildTextAreaField(String label, TextEditingController controller) { return TextFormField( controller: controller, diff --git a/lib/pages/postEnrollment/policies.dart b/lib/pages/postEnrollment/policies.dart index a4f4f37..3f5f762 100755 --- a/lib/pages/postEnrollment/policies.dart +++ b/lib/pages/postEnrollment/policies.dart @@ -48,6 +48,7 @@ class _policiesState extends State { dynamic EmployeePolicy; List> employeeDetails = []; dynamic argumentsData; + bool ECardHide = true; bool _isExpanded = false; void _onTabChanged(int index) { @@ -90,11 +91,12 @@ class _policiesState extends State { } } - Future getEcardDownload() async { + Future getEcardDownload(id) async { final clientPolicyID = widget.arguments?['client_policy_id']; final policyNo = widget.arguments?['policy_no']; final eCarDParams = { - 'id': empPrimaryId, + // 'id': empPrimaryId, + 'id': id, 'emp_code': empCodeString, 'client_policy_id': clientPolicyID, 'policy_no': policyNo @@ -269,9 +271,18 @@ class _policiesState extends State { String relationship = employee['relationship']; String dob = employee['dob']; String gender = employee['gender']; - employeeDetails.add({'name': name, 'relationship': relationship,'dob':dob,'gender':gender}); + String id = employee['id']; + employeeDetails.add({'id':id,'name': name, 'relationship': relationship,'dob':dob,'gender':gender}); }); } + setState(() { + if(argumentsData['policy_type'] == 'GMC' || argumentsData['policy_type'] == 'GMC - Parents' || argumentsData['policy_type'] == 'GMC - Topup' || argumentsData['policy_type'] == 'GMC - Topup(Parents)'){ + ECardHide = true; + } else { + ECardHide = false; + } + }); + sortEmployeeDetails(employeeDetails); print('employeeDetails'); print(employeeDetails); @@ -333,7 +344,7 @@ class _policiesState extends State { flex: 11, child: Row( mainAxisAlignment: Responsive.isDesktop(context) - ? MainAxisAlignment.center + ? MainAxisAlignment.start : MainAxisAlignment.start, children: [ Text( @@ -369,7 +380,7 @@ class _policiesState extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - if(argumentsData['policy_type'] != 'OPD') + if(ECardHide) Expanded( flex: Responsive.isDesktop(context) ? 4 : 6, child: Container( @@ -388,7 +399,7 @@ class _policiesState extends State { : 180, child: TextButton( onPressed: () { - getEcardDownload(); + getEcardDownload(empPrimaryId); // if (argumentsData['eCardDownload'] != // null) { // _launchURL( @@ -433,9 +444,9 @@ class _policiesState extends State { ), ))), )), - if (Responsive.isDesktop(context)) - Expanded(flex: 4, child: Container()), - if(argumentsData['policy_type'] != 'OPD') + // if (Responsive.isDesktop(context)) + // Expanded(flex: 4, child: Container()), + // if(argumentsData['policy_type'] != 'OPD') Expanded( flex: Responsive.isDesktop(context) ? 4 : 6, child: Container( @@ -601,7 +612,7 @@ class _policiesState extends State { CrossAxisAlignment.center, children: [ Expanded( - flex: 8, + flex: 6, child: Container( alignment: Alignment.centerLeft, padding: Responsive.isDesktop(context) @@ -665,21 +676,63 @@ class _policiesState extends State { ), ), Expanded( - flex: 4, + flex: 6, child: Container( alignment: Alignment.centerRight, - child: Text( - detail['relationship']!, - textAlign: TextAlign.end, - style: GoogleFonts.poppins( - fontSize: + padding: Responsive.isDesktop(context) + ? EdgeInsets.only( + top: 10, + bottom: 10, + left: 10, + right: 10) + : EdgeInsets.only( + top: 15, + bottom: 15, + left: 7, + right: 7), + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + if(ECardHide)...[ + Container( + alignment: Alignment.centerRight, + child: MouseRegion( + cursor: SystemMouseCursors.click, // Web pointer + child: GestureDetector( + onTap: () { + getEcardDownload(detail['id']); + }, + child: Tooltip( + message: 'E-Card', + waitDuration: const Duration(milliseconds: 300), + showDuration: const Duration(seconds: 2), + child: SvgPicture.string( + SvgService.getSvg('ECard'), + width: 25, + height: 25, + ), + ), + ), + ), + ), + + const SizedBox(height: 4), + ], + + Text( + detail['relationship']!, + textAlign: TextAlign.end, + style: GoogleFonts.poppins( + fontSize: Responsive.isDesktop(context) ? 16 : 14, - color: Color(0xFF404040), - fontWeight: FontWeight.w400, - ), - ), + color: Color(0xFF404040), + fontWeight: FontWeight.w400, + ), + ), + ], + ) ), ), ], diff --git a/lib/pages/postEnrollment/profile.dart b/lib/pages/postEnrollment/profile.dart index cf0111f..b6664a9 100755 --- a/lib/pages/postEnrollment/profile.dart +++ b/lib/pages/postEnrollment/profile.dart @@ -217,6 +217,7 @@ class _profileState extends State { body: json.encode(params), headers: { HttpHeaders.contentTypeHeader: 'application/json', + 'APP-SIGNATURE': 'nhance-2025-signature-T8f6gV9k5fK2wf5V5c4vId3b0J8z6cAm2x8Y', }, ); @@ -749,7 +750,7 @@ class _profileState extends State { ])), SizedBox(height: 12), if (Responsive.isMobile(context) || - Responsive.isTablet(context)) + Responsive.isTablet(context)) ...[ Container( child: Row( children: [ @@ -787,7 +788,8 @@ class _profileState extends State { ], ), ), - SizedBox(height: 10), + SizedBox(height: 10), + ], Container( // color: Colors.amberAccent, width: MediaQuery.of(context).size.width, @@ -797,10 +799,11 @@ class _profileState extends State { mainAxisSize: MainAxisSize.min, children: [ // ✅ Change Password Button - if(Responsive.isDesktop(context)) - _buildChangePasswordButton(context), + if(Responsive.isDesktop(context))...[ + _buildChangePasswordButton(context), - const SizedBox(width: 10), + const SizedBox(width: 10), + ], // ✅ Logout Button Responsive.isDesktop(context) diff --git a/lib/pages/postEnrollment/tickettracklist.dart b/lib/pages/postEnrollment/tickettracklist.dart index 98de642..e2c82df 100755 --- a/lib/pages/postEnrollment/tickettracklist.dart +++ b/lib/pages/postEnrollment/tickettracklist.dart @@ -480,7 +480,7 @@ class _tickettracklistState extends State { SizedBox( width: 5), Text( - name, + name ?? '', style: GoogleFonts .poppins( fontSize: diff --git a/lib/pages/session/SetPinBiometric.dart b/lib/pages/session/SetPinBiometric.dart index f198e65..8219a11 100755 --- a/lib/pages/session/SetPinBiometric.dart +++ b/lib/pages/session/SetPinBiometric.dart @@ -202,10 +202,12 @@ class _pinPageState extends State { } } else { ToastHelper.showErrorToast(context, 'Something went wrong'); + context.go('/login'); throw Exception('Failed to verify pin number'); } } catch (e) { ToastHelper.showErrorToast(context, 'Something went wrong'); + context.go('/login'); print('Error: $e'); } } @@ -492,6 +494,34 @@ class _pinPageState extends State { return false; }, child: Scaffold( + resizeToAvoidBottomInset: true, // IMPORTANT + bottomNavigationBar: SafeArea( + child: Container( + color: Colors.white, // 👈 set your color here + padding: const EdgeInsets.only(bottom: 8, top: 4), + child: RichText( + textAlign: TextAlign.center, + text: TextSpan( + text: 'By continuing, you agree with our ', + style: GoogleFonts.poppins( + color: Colors.black, + fontSize: 9, + ), + children: const [ + TextSpan( + text: 'privacy policy ', + style: TextStyle(color: Color(0xFF00989E)), + ), + TextSpan(text: 'and '), + TextSpan( + text: 'terms of use', + style: TextStyle(color: Color(0xFF00989E)), + ), + ], + ), + ), + ), + ), body: Container( color: Colors.white, // Set the color for the body child: SizedBox.expand( @@ -697,6 +727,11 @@ class _pinPageState extends State { focusedBorderColor), ), ), + obscureText: true, + obscuringWidget: const Text( + '●', + style: TextStyle(fontSize: 12,color: Colors.black87), + ), submittedPinTheme: defaultPinTheme .copyWith( @@ -761,7 +796,7 @@ class _pinPageState extends State { forgotPin(); }, child: Text( - 'Forget PIN?', + 'Forgot PIN?', style: GoogleFonts .poppins( fontSize: 12, @@ -776,6 +811,41 @@ class _pinPageState extends State { ], ), ), + SizedBox(height: 15), + Container( + margin: + EdgeInsets.symmetric( + horizontal: 30), + child: SizedBox( + width: double.infinity, + height: 45, + child: ElevatedButton( + style: ElevatedButton + .styleFrom( + backgroundColor: + Color(0xFF00989E), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 10), + ), + ), + onPressed: () async { + forgotPin(); + // context.go('/login'); + }, + child: Text( + "Login with OTP", + style: GoogleFonts + .poppins( + color: Color( + 0xFFFFFFFF)), + ), + ), + ), + ), ], ), ), @@ -791,48 +861,6 @@ class _pinPageState extends State { ), ]), )), - Align( - alignment: Alignment.bottomCenter, - child: SafeArea( - child: Container( - padding: EdgeInsets.only(bottom: 8), - width: double.infinity, - child: RichText( - textAlign: TextAlign.center, - text: TextSpan( - text: 'By continuing, you agree with our ', - style: GoogleFonts.poppins( - color: Colors.black, - fontSize: 9, - ), - children: [ - TextSpan( - text: 'privacy policy ', - style: GoogleFonts.poppins( - color: Color(0xFF00989E), - fontSize: 9, - ), - ), - TextSpan( - text: 'and ', - style: GoogleFonts.poppins( - color: Colors.black, - fontSize: 9, - ), - ), - TextSpan( - text: 'terms of use', - style: GoogleFonts.poppins( - color: Color(0xFF00989E), - fontSize: 9, - ), - ), - ], - ), - ), - ), - ), - ) ]), )))); } diff --git a/lib/pages/session/changePin.dart b/lib/pages/session/changePin.dart index bfeeabb..88cfe44 100755 --- a/lib/pages/session/changePin.dart +++ b/lib/pages/session/changePin.dart @@ -174,6 +174,34 @@ class _changePinState extends State { ); return Scaffold( + resizeToAvoidBottomInset: true, // IMPORTANT + bottomNavigationBar: SafeArea( + child: Container( + color: Colors.white, // 👈 set your color here + padding: const EdgeInsets.only(bottom: 8, top: 4), + child: RichText( + textAlign: TextAlign.center, + text: TextSpan( + text: 'By continuing, you agree with our ', + style: GoogleFonts.poppins( + color: Colors.black, + fontSize: 9, + ), + children: const [ + TextSpan( + text: 'privacy policy ', + style: TextStyle(color: Color(0xFF00989E)), + ), + TextSpan(text: 'and '), + TextSpan( + text: 'terms of use', + style: TextStyle(color: Color(0xFF00989E)), + ), + ], + ), + ), + ), + ), body: Container( color: Colors.white, // Set the color for the body child: SizedBox.expand( @@ -534,45 +562,6 @@ class _changePinState extends State { ), ]), )), - Align( - alignment: Alignment.bottomCenter, - child: Container( - width: double.infinity, // Make the footer full width - child: RichText( - textAlign: TextAlign.center, - text: TextSpan( - text: 'By continuing, you agree with our ', - style: GoogleFonts.poppins( - color: Colors.black, - fontSize: 9, - ), - children: [ - TextSpan( - text: 'privacy policy ', - style: GoogleFonts.poppins( - color: Color(0xFF00989E), - fontSize: 9, - ), - ), - TextSpan( - text: 'and ', - style: GoogleFonts.poppins( - color: Colors.black, - fontSize: 9, - ), - ), - TextSpan( - text: 'terms of use', - style: GoogleFonts.poppins( - color: Color(0xFF00989E), - fontSize: 9, - ), - ), - ], - ), - ), - ), - ), ]), ))); } diff --git a/lib/pages/session/settingUpPinAndBiometric.dart b/lib/pages/session/settingUpPinAndBiometric.dart index 19a3072..7727556 100755 --- a/lib/pages/session/settingUpPinAndBiometric.dart +++ b/lib/pages/session/settingUpPinAndBiometric.dart @@ -253,6 +253,34 @@ class _pinSettingPageState extends State { return false; }, child: Scaffold( + resizeToAvoidBottomInset: true, // IMPORTANT + bottomNavigationBar: SafeArea( + child: Container( + color: Colors.white, // 👈 set your color here + padding: const EdgeInsets.only(bottom: 8, top: 4), + child: RichText( + textAlign: TextAlign.center, + text: TextSpan( + text: 'By continuing, you agree with our ', + style: GoogleFonts.poppins( + color: Colors.black, + fontSize: 9, + ), + children: const [ + TextSpan( + text: 'privacy policy ', + style: TextStyle(color: Color(0xFF00989E)), + ), + TextSpan(text: 'and '), + TextSpan( + text: 'terms of use', + style: TextStyle(color: Color(0xFF00989E)), + ), + ], + ), + ), + ), + ), body: Container( color: Colors.white, // Set the color for the body child: SizedBox.expand( @@ -716,48 +744,6 @@ class _pinSettingPageState extends State { ), ]), )), - Align( - alignment: Alignment.bottomCenter, - child: SafeArea( - child: Container( - padding: EdgeInsets.only(bottom: 8), - width: double.infinity, - child: RichText( - textAlign: TextAlign.center, - text: TextSpan( - text: 'By continuing, you agree with our ', - style: GoogleFonts.poppins( - color: Colors.black, - fontSize: 9, - ), - children: [ - TextSpan( - text: 'privacy policy ', - style: GoogleFonts.poppins( - color: Color(0xFF00989E), - fontSize: 9, - ), - ), - TextSpan( - text: 'and ', - style: GoogleFonts.poppins( - color: Colors.black, - fontSize: 9, - ), - ), - TextSpan( - text: 'terms of use', - style: GoogleFonts.poppins( - color: Color(0xFF00989E), - fontSize: 9, - ), - ), - ], - ), - ), - ), - ), - ) ]), )))); } diff --git a/pubspec.yaml b/pubspec.yaml index a12d85a..bba65eb 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,8 +17,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. #version: 1.0.32+32 -version: 1.0.24+27 -#version: 2.0.9+47 +version: 1.0.28+33 +#version: 2.0.15+53 environment: sdk: '>=3.3.3 <4.0.0'