CLAIMS STEPPER EXCEPTIONAL CASE

This commit is contained in:
venbaittech 2025-07-16 12:15:17 +05:30
parent 3702c55188
commit a59e462935

View File

@ -394,11 +394,14 @@ class _ClaimHistoryPopupState extends State<ClaimHistoryPopup> {
print('stepData'); print('stepData');
print(stepData); print(stepData);
Widget content = _getStepContentFromApi(stepData);
return _buildStep( return _buildStep(
stepNumber: index + 1, stepNumber: index + 1,
title: _getStepTitleFromApi( title: _getStepTitleFromApi(
stepTitleKey, stepData), stepTitleKey, stepData),
content: _getStepContentFromApi(stepData), content: content,
// content: _getStepContentFromApi(stepData),
isLast: index == stepKeys.length - 1, isLast: index == stepKeys.length - 1,
); );
}), }),
@ -439,6 +442,13 @@ class _ClaimHistoryPopupState extends State<ClaimHistoryPopup> {
bool isLast = false, bool isLast = false,
}) { }) {
print(title); print(title);
final noContent;
if ((content as Column).children.isEmpty) {
noContent = 0;
} else {
noContent = 1;
}
return Row( return Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -470,7 +480,8 @@ class _ClaimHistoryPopupState extends State<ClaimHistoryPopup> {
// Dotted line below circle (except for last step) // Dotted line below circle (except for last step)
if (!isLast) if (!isLast)
Container( Container(
height: 50, // increase to extend line height: noContent == 1 ? 50 : 20,
// increase to extend line
width: 2, width: 2,
margin: EdgeInsets.only(top: 4, bottom: 4), margin: EdgeInsets.only(top: 4, bottom: 4),
child: CustomPaint( child: CustomPaint(
@ -488,7 +499,8 @@ class _ClaimHistoryPopupState extends State<ClaimHistoryPopup> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
title, title,
SizedBox(height: 8), if (noContent == 1) SizedBox(height: noContent == 0 ? 0 : 8),
if (noContent == 1)
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
@ -499,7 +511,7 @@ class _ClaimHistoryPopupState extends State<ClaimHistoryPopup> {
), ),
child: content, child: content,
), ),
SizedBox(height: isLast ? 0 : 16), if (noContent == 1) SizedBox(height: isLast ? 0 : 16),
], ],
), ),
), ),