feat: update coverage display logic to show status only when applicable
This commit is contained in:
@@ -73,6 +73,7 @@ class CoverageDashboard extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Text("Today's Status", style: UiTypography.body1m.textSecondary),
|
||||
if (totalNeeded > 0 || totalConfirmed > 0)
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: UiConstants.space2,
|
||||
|
||||
@@ -53,6 +53,7 @@ class CoverageWidget extends StatelessWidget {
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
),
|
||||
if (totalNeeded > 0 || totalConfirmed > 0 || coveragePercent > 0)
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: UiConstants.space2,
|
||||
@@ -65,18 +66,13 @@ class CoverageWidget extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
'$coveragePercent% Covered',
|
||||
style: UiTypography.footnote2b.copyWith(
|
||||
color: textColor,
|
||||
),
|
||||
style: UiTypography.footnote2b.copyWith(color: textColor),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (subtitle != null) ...<Widget>[
|
||||
Text(
|
||||
subtitle!,
|
||||
style: UiTypography.body2r.textSecondary,
|
||||
),
|
||||
Text(subtitle!, style: UiTypography.body2r.textSecondary),
|
||||
],
|
||||
const SizedBox(height: UiConstants.space6),
|
||||
Row(
|
||||
@@ -90,7 +86,8 @@ class CoverageWidget extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
if (totalConfirmed != 0) Expanded(
|
||||
if (totalConfirmed != 0)
|
||||
Expanded(
|
||||
child: _MetricCard(
|
||||
icon: UiIcons.success,
|
||||
iconColor: UiColors.iconSuccess,
|
||||
|
||||
Reference in New Issue
Block a user