Flutter 如何向线性渐变指示器添加线性渐变?

Flutter 如何向线性渐变指示器添加线性渐变?,flutter,flutter-animation,Flutter,Flutter Animation,如何将LinearGradient添加到LinearProgressIndicator 这就是我现在拥有的: LinearProgressIndicator( value: 0.3, valueColor: AlwaysStoppedAnimation<Color>(Colors.blue), ) LinearProgressIndicator( 数值:0.3, valueColor:AlwaysStoppedAnimation(颜色.蓝色), ) 我想用线性渐变来代替颜色。

如何将LinearGradient添加到LinearProgressIndicator

这就是我现在拥有的:

LinearProgressIndicator(
 value: 0.3,
 valueColor: AlwaysStoppedAnimation<Color>(Colors.blue),
)
LinearProgressIndicator(
数值:0.3,
valueColor:AlwaysStoppedAnimation(颜色.蓝色),
)
我想用线性渐变来代替颜色。 可能吗?

您可以使用带有
GradientProgressIndicator
的软件包,我相信您正在寻找该软件包

比你能用的还要多

GradientProgressIndicator(
                  gradient: Gradients.rainbowBlue,
                );