From e30f5de87474f7a346de6962135fb0fc89416d73 Mon Sep 17 00:00:00 2001 From: Shawn Date: Mon, 13 Feb 2023 10:38:55 -0700 Subject: [PATCH] Tweak loading indicator to start with indeterminant spinner until progress has started. --- .../common/controls/app_loading_indicator.dart | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/ui/common/controls/app_loading_indicator.dart b/lib/ui/common/controls/app_loading_indicator.dart index eb00cca7..5576796c 100644 --- a/lib/ui/common/controls/app_loading_indicator.dart +++ b/lib/ui/common/controls/app_loading_indicator.dart @@ -7,14 +7,16 @@ class AppLoadingIndicator extends StatelessWidget { @override Widget build(BuildContext context) { + final progress = (value == null || value! < .05) ? null : value; + return SizedBox( - width: 40, - height: 40, - child: CircularProgressIndicator( - color: color ?? $styles.colors.accent1, - value: value, - strokeWidth: 1.0, - ), - ); + width: 40, + height: 40, + child: CircularProgressIndicator( + color: color ?? $styles.colors.accent1, + value: progress, + strokeWidth: 1.0, + ), + ); } }