This commit is contained in:
Surendiran 2025-07-21 17:10:19 +05:30
commit c5d5f3aadd
2 changed files with 70 additions and 76 deletions

View File

@ -67,23 +67,7 @@ class _ActivePolicieState extends State<ActivePolicies> {
// "membersCountOfEnrolled": 0, // "membersCountOfEnrolled": 0,
// "membersCountOfDraft": 7 // "membersCountOfDraft": 7
// }, // },
// { //
// "client_policy_id": 396,
// "client_id": 58,
// "policy_type_id": 4,
// "is_addon": 2,
// "OpenForEnrollment": 1,
// "inception_type": 2,
// "policy_no": "GMC-MA8596745566998855885",
// "insurer_id": 1,
// "type": "GMC - Topup",
// "policy_name": "Group Medical Coverage Topup",
// "insurer_name": "Life Insurance Corporation of India (LIC)",
// "insurer_short_name": "LIC",
// "totalMembersCount": 7,
// "membersCountOfEnrolled": 0,
// "membersCountOfDraft": 7
// },
// ]; // ];
@override @override
@ -227,15 +211,18 @@ class _ActivePolicieState extends State<ActivePolicies> {
'assets/nhance-loader.gif'), // Adjust path to your GIF loader 'assets/nhance-loader.gif'), // Adjust path to your GIF loader
), ),
) )
: Column( : Flexible(
mainAxisAlignment: MainAxisAlignment.center, child: Container(
children: [ // color: Colors.redAccent.shade100,
Container( // height: MediaQuery.of(context).size.height * 0.4,
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
child: Container(
// color: Colors.redAccent.shade100, // color: Colors.redAccent.shade100,
// color: Colors.white, // color: Colors.white,
// color: Colors.white, // color: Colors.white,
padding: EdgeInsets.symmetric(horizontal: 16.0), padding: EdgeInsets.symmetric(horizontal: 16.0),
height: MediaQuery.of(context).size.height * 0.4, // height: MediaQuery.of(context).size.height * 0.4,
// height: 400, // height: 400,
child: getCardArrays.isEmpty child: getCardArrays.isEmpty
@ -264,7 +251,8 @@ class _ActivePolicieState extends State<ActivePolicies> {
}, },
), ),
), ),
], // ],
),
), ),
], ],
), ),

View File

@ -32,21 +32,22 @@ class _PreEnrollmentState extends State<PreEnrollment> {
bool isLoading = false; bool isLoading = false;
// List<Map<String, dynamic>> getCardArrays = [ // List<Map<String, dynamic>> getCardArrays = [
// { // {
// "client_policy_id": 392, // "client_policy_id": "415",
// "client_id": 58, // "client_id": "187",
// "policy_type_id": 2, // "policy_type_id": "2",
// "is_addon": 1, // "is_addon": "1",
// "OpenForEnrollment": 1, // "OpenForEnrollment": "0",
// "inception_type": 2, // "inception_type": "1",
// "policy_no": "GMC-MA8596745566998855885", // "policy_no": "GMC-2002/2022/2005",
// "insurer_id": 1, // "insurer_id": null,
// "policy_expiry_date": "06-07-2026",
// "type": "GMC", // "type": "GMC",
// "policy_name": "Group Medical Coverage", // "policy_name": "Group Medical Coverage",
// "insurer_name": "Life Insurance Corporation of India (LIC)", // "insurer_name": null,
// "insurer_short_name": "LIC", // "insurer_short_name": null,
// "totalMembersCount": 7, // "totalMembersCount": 17,
// "membersCountOfEnrolled": 0, // "membersCountOfEnrolled": 0,
// "membersCountOfDraft": 7 // "membersCountOfDraft": 17
// }, // },
// { // {
// "client_policy_id": 396, // "client_policy_id": 396,
@ -66,7 +67,6 @@ class _PreEnrollmentState extends State<PreEnrollment> {
// "membersCountOfDraft": 7 // "membersCountOfDraft": 7
// }, // },
// //
//
// ]; // ];
@override @override
@ -113,6 +113,7 @@ class _PreEnrollmentState extends State<PreEnrollment> {
print(response['data']); print(response['data']);
print("_PreEnrollmentState 3"); print("_PreEnrollmentState 3");
// getCardArrays = [];
getCardArrays = List<Map<String, dynamic>>.from(response['data']); getCardArrays = List<Map<String, dynamic>>.from(response['data']);
print('getCardArrays'); print('getCardArrays');
print(getCardArrays); print(getCardArrays);
@ -172,17 +173,20 @@ class _PreEnrollmentState extends State<PreEnrollment> {
'assets/nhance-loader.gif'), // Adjust path to your GIF loader 'assets/nhance-loader.gif'), // Adjust path to your GIF loader
), ),
) )
: Container( : Flexible(
child: Container(
// color: Colors.redAccent.shade100, // color: Colors.redAccent.shade100,
// color: Colors.white, // color: Colors.white,
// color: Colors.white, // color: Colors.white,
// padding: EdgeInsets.symmetric(horizontal: 16.0), // padding: EdgeInsets.symmetric(horizontal: 16.0),
height: MediaQuery.of(context).size.height * 0.45, // height: MediaQuery.of(context).size.height * 0.45,
// height: 400, // height: 400,
child: Container(
child: getCardArrays.isEmpty child: getCardArrays.isEmpty
? Center( ? Center(
child: Column( child: Column(
mainAxisSize: MainAxisSize.min,
children: [ children: [
Image.asset( Image.asset(
'assets/searchData.jpg', // Replace 'default_image.png' with your default image asset path 'assets/searchData.jpg', // Replace 'default_image.png' with your default image asset path
@ -216,6 +220,8 @@ class _PreEnrollmentState extends State<PreEnrollment> {
}, },
), ),
), ),
),
),
], ],
), ),
); );