S360fStatusGradientBar constructor

const S360fStatusGradientBar({
  1. Key? key,
  2. String startLabel = 'Pay Attention',
  3. String endLabel = 'Well Prepared',
  4. List<Color> segmentColors = const [Color(0xFFF44336), Color(0xFFFF9800), Color(0xFFFFEB3B), Color(0xFF8BC34A), Color(0xFF4CAF50)],
})

A gradient bar with 5 segments and labels on both ends

startLabel - Text to display at the start (left) endLabel - Text to display at the end (right) segmentColors - List of 5 colors for the segments (left to right)

Implementation

const S360fStatusGradientBar({
  super.key,
  this.startLabel = 'Pay Attention',
  this.endLabel = 'Well Prepared',
  this.segmentColors = const [
    Color(0xFFF44336), // Red
    Color(0xFFFF9800), // Orange
    Color(0xFFFFEB3B), // Yellow
    Color(0xFF8BC34A), // Light Green
    Color(0xFF4CAF50), // Green
  ],
}) : assert(segmentColors.length == 5, 'Must provide exactly 5 colors');