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