LinearProgressIndicator constructor

const LinearProgressIndicator({
  1. Key? key,
  2. double? value,
  3. Color? backgroundColor,
  4. double? minHeight,
  5. Color? color,
  6. Gradient? progressGradient,
  7. BorderRadiusGeometry? borderRadius,
  8. bool? showSparks,
  9. bool? disableAnimation,
})

Creates a LinearProgressIndicator.

The component automatically handles both determinate and indeterminate modes based on whether value is provided. Theming and visual effects can be customized through individual parameters or via LinearProgressIndicatorTheme.

Parameters:

  • value (double?, optional): Progress completion (0.0-1.0) or null for indeterminate
  • backgroundColor (Color?, optional): Track background color override
  • minHeight (double?, optional): Minimum indicator height override
  • color (Color?, optional): Progress fill color override
  • progressGradient (Gradient?, optional): Progress fill gradient override
  • borderRadius (BorderRadiusGeometry?, optional): Container border radius override
  • showSparks (bool?, optional): Whether to show spark effects
  • disableAnimation (bool?, optional): Whether to disable smooth transitions

Example:

LinearProgressIndicator(
  value: 0.4,
  color: Colors.green,
  backgroundColor: Colors.grey.shade300,
  minHeight: 8.0,
  showSparks: true,
);

Implementation

const LinearProgressIndicator({
  super.key,
  this.value,
  this.backgroundColor,
  this.minHeight,
  this.color,
  this.progressGradient,
  this.borderRadius,
  this.showSparks,
  this.disableAnimation,
});