From 17799aa1919d578990d6c50f9e3aaafb1a74cfa4 Mon Sep 17 00:00:00 2001 From: Steef Hegeman Date: Fri, 23 Jul 2021 16:59:46 +0200 Subject: [PATCH] fix: busy loop due to CircularProgressIndicator It can get redrawn even if the owning AnimatedContainer class has height 0. Setting it to completion when done stops the rebuilding cpu overhead. --- lib/widgets/connection_status_header.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/connection_status_header.dart b/lib/widgets/connection_status_header.dart index 639380cb2..4883ac630 100644 --- a/lib/widgets/connection_status_header.dart +++ b/lib/widgets/connection_status_header.dart @@ -58,7 +58,7 @@ class _ConnectionStatusHeaderState extends State { height: 24, child: CircularProgressIndicator( strokeWidth: 2, - value: _status.progress, + value: _connected ? 1.0 : _status.progress, ), ), SizedBox(width: 12),