0

I want linear indicator for dynamic values how to use condition in stock details and color values

enter image description here

Mathan Tr
  • 47
  • 3

1 Answers1

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