Fixed indicator initial position

This commit is contained in:
Vadim 2023-02-19 18:11:01 +03:00
parent 92793e013d
commit 07d777da9b

View file

@ -70,6 +70,8 @@ class _MeteringMeasureButtonState extends State<MeteringMeasureButton> {
), ),
Positioned.fill( Positioned.fill(
child: CircularProgressIndicator( child: CircularProgressIndicator(
/// This key is needed to make indicator start from the same point every time
key: ValueKey(widget.isMetering),
color: Theme.of(context).colorScheme.onSurface, color: Theme.of(context).colorScheme.onSurface,
strokeWidth: Dimens.grid4, strokeWidth: Dimens.grid4,
value: widget.isMetering ? null : 1, value: widget.isMetering ? null : 1,