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);
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<ClaimHistoryPopup> {
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<ClaimHistoryPopup> {
// 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<ClaimHistoryPopup> {
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),
],
),
),