I want linear indicator for dynamic values how to use condition in stock details and color values
Asked
Active
Viewed 23 times
1 Answers
0
You can try this.
double stockValue = 0.5; // update stock value
LinearProgressIndicator(
backgroundColor: const Color(0xFFB4B4B4),
valueColor: AlwaysStoppedAnimation<Color>(stockValue == 1?Colors.red:Colors.green),
value: stockValue,
),

Ravi Patel
- 89
- 4