LinearProgressWidget constructor

const LinearProgressWidget({
  1. Key? key,
  2. double progress = 1.0,
  3. Color backgroundColor = Colors.grey,
  4. Color progressColor = Colors.blue,
  5. double height = 6.0,
  6. bool determinate = false,
})

Creates a linear progress widget.

Parameters:

  • progress: Progress value from 0.0 to 1.0 (defaults to 1.0 / 100%)
  • backgroundColor: Track background color (defaults to grey)
  • progressColor: Progress indicator color (defaults to blue)
  • height: Height of the progress bar (defaults to 6.0)
  • determinate: Whether to show determinate progress (defaults to false/indeterminate)

Implementation

const LinearProgressWidget({
  super.key,
  this.progress = 1.0, // Default to 100% progress
  this.backgroundColor = Colors.grey, // Default background color
  this.progressColor = Colors.blue, // Default progress color
  this.height = 6.0, // Default height of the progress bar
  this.determinate = false, // Default indeterminate progress
});