Flutter 颤振:向我的进度条添加渐变

Flutter 颤振:向我的进度条添加渐变,flutter,Flutter,首先,我要说的是,我上周开始学习颤振,所以我提前为自己的知识不足道歉 我正在应用程序中使用进度条: FAProgressBar( size: 50, currentValue: dailyProgress, direction: Axis.vertical, verticalDirection: VerticalDirection.up, progressColor: Colors.amber, backgroundColor: Colors.gr

首先,我要说的是,我上周开始学习颤振,所以我提前为自己的知识不足道歉

我正在应用程序中使用进度条:

FAProgressBar(
    size: 50,
    currentValue: dailyProgress,
    direction: Axis.vertical,
    verticalDirection: VerticalDirection.up,
    progressColor: Colors.amber,
    backgroundColor: Colors.grey[300],
    animatedDuration: const Duration(milliseconds: 2000),
),
实际上是这样的:

我希望它看起来像这样:

你建议我怎么做?似乎不可能用渐变替换progressColor属性。有没有其他包我可以用?任何建议都将不胜感激。

我建议您试试颤振包装


它有GradientProgressIndicator,应该适合您的需要。

谢谢!但是GradientProgressIndicator文档是有限的。除了梯度和值,我似乎找不到任何其他属性。为了满足我的需要,我想能够定义背景颜色,方向等。