@override
  Widget build(BuildContext context) {
    return AnimatedBuilder(
      animation: _controller,
      builder: (context, child) => LinearProgressIndicator(
        value: _curveAnimation.value,
        valueColor: _colorAnimation,
        backgroundColor: _colorAnimation.value?.withOpacity(0.4),
      ),
    );
  }
}


    The didUpdateWidget function updates
the AnimatedProgressIndicatorState whenever
AnimatedProgressIndicator changes.

Use the new AnimatedProgressIndicator.
Then, replace the LinearProgressIndicator in the Form
with this new AnimatedProgressIndicator:

    
child: Column(
  mainAxisSize: MainAxisSize.min,
  children: [
    AnimatedProgressIndicator(value: _formProgress), // NEW
    Text('Sign up', style: Theme.of(context).textTheme.headlineMedium),
    Padding(