user12112193
user12112193

Reputation:

Flutter: adding a gradient to my progress bar

Let me first say I started with flutter last week so I apologise in advance for my lack of knowledge.

I'm using a progress bar in my application:

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

In reality it looks like this: https://i.sstatic.net/sPubq.jpg

I want it to look like this: https://i.sstatic.net/QNHDo.jpg

How would you recommend me to proceed? It seems impossible to replace the progressColor property with a gradient. Is there another package I can use? Any suggestion is appreciated.

Upvotes: 1

Views: 4108

Answers (1)

zilijonas
zilijonas

Reputation: 3745

I suggest you try Gradient Widgets package for Flutter.

It has GradientProgressIndicator which should fit your needs.

Upvotes: 1

Related Questions