How do I set the animation color of a LinearProgressIndicator?

If you want to set a constant color you can use :

CircularProgressIndicator(
  valueColor: AlwaysStoppedAnimation<Color>(Colors.white),
)

Looks like it's controlled from the Theme's accent color: https://github.com/flutter/flutter/blob/b670ce4bcc49bbab745221eae24fcebcbc9dba7c/packages/flutter/lib/src/material/progress_indicator.dart#L61

Wrap the relevant subtree in a modified Theme setting the accentColor to whatever you might like.


LinearProgressIndicator(
    backgroundColor: Color(0xFFB4B4B4),
    valueColor: AlwaysStoppedAnimation<Color>(Colors.green),
)

Tags:

Flutter