diff --git a/lib/pages/postEnrollment/claimshistory.dart b/lib/pages/postEnrollment/claimshistory.dart index 0b178b1..184c24f 100644 --- a/lib/pages/postEnrollment/claimshistory.dart +++ b/lib/pages/postEnrollment/claimshistory.dart @@ -394,11 +394,14 @@ class _ClaimHistoryPopupState extends State { print('stepData'); print(stepData); + Widget content = _getStepContentFromApi(stepData); + return _buildStep( stepNumber: index + 1, title: _getStepTitleFromApi( stepTitleKey, stepData), - content: _getStepContentFromApi(stepData), + content: content, + // content: _getStepContentFromApi(stepData), isLast: index == stepKeys.length - 1, ); }), @@ -439,6 +442,13 @@ class _ClaimHistoryPopupState extends State { bool isLast = false, }) { print(title); + final noContent; + if ((content as Column).children.isEmpty) { + noContent = 0; + } else { + noContent = 1; + } + return Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -470,7 +480,8 @@ class _ClaimHistoryPopupState extends State { // Dotted line below circle (except for last step) if (!isLast) Container( - height: 50, // increase to extend line + height: noContent == 1 ? 50 : 20, + // increase to extend line width: 2, margin: EdgeInsets.only(top: 4, bottom: 4), child: CustomPaint( @@ -488,18 +499,19 @@ class _ClaimHistoryPopupState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ title, - SizedBox(height: 8), - Container( - width: double.infinity, - padding: EdgeInsets.all(12), - decoration: BoxDecoration( - color: Color(0xFFF7F7F7), - borderRadius: BorderRadius.circular(8), - border: Border.all(color: Color(0xFFE0E0E0)), + if (noContent == 1) SizedBox(height: noContent == 0 ? 0 : 8), + if (noContent == 1) + Container( + width: double.infinity, + padding: EdgeInsets.all(12), + decoration: BoxDecoration( + color: Color(0xFFF7F7F7), + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Color(0xFFE0E0E0)), + ), + child: content, ), - child: content, - ), - SizedBox(height: isLast ? 0 : 16), + if (noContent == 1) SizedBox(height: isLast ? 0 : 16), ], ), ),