Overview
HuxProgress is a customizable linear progress indicator that displays the completion status of a task or process. It provides smooth animations, consistent styling, and automatic theme adaptation, making it perfect for showing upload progress, download status, or any task completion percentage.Basic Usage
Basic Progress
Progress with Label
Progress with Value Display
Variants
HuxProgress supports three visual variants to indicate different states:Primary Variant
Success Variant
Destructive Variant
Sizes
HuxProgress comes in three size variants:Small
Medium (Default)
Large
Custom Values
By default, HuxProgress uses values between 0.0 and 1.0. You can customize the range:Custom Colors
You can customize both the progress fill color and background color:Custom Border Radius
Animated Progress
HuxProgress automatically animates when the value changes:API Reference
HuxProgress
| Property | Type | Default | Description |
|---|---|---|---|
value | double | required | The current progress value (between min and max) |
min | double | 0.0 | Minimum value for the progress |
max | double | 1.0 | Maximum value for the progress |
label | String? | null | Optional label displayed above the progress bar |
showValue | bool | false | Whether to show the current value as a percentage or number |
size | HuxProgressSize | HuxProgressSize.medium | Size variant of the progress bar |
variant | HuxProgressVariant | HuxProgressVariant.primary | Visual variant of the progress bar |
backgroundColor | Color? | null | Custom background color for the progress track |
color | Color? | null | Custom color for the progress fill |
borderRadius | double? | null | Border radius for the progress bar |
HuxProgressSize
small- Small progress bar (4px height)medium- Medium progress bar (6px height)large- Large progress bar (8px height)
HuxProgressVariant
primary- Primary progress using theme primary colorsuccess- Success progress using green colordestructive- Destructive progress using red color
Best Practices
- Use progress indicators for operations that take more than a few seconds
- Show labels to provide context about what is loading
- Use the success variant for completed operations
- Use the destructive variant for errors or failed operations
- Consider using
showValue: truewhen precise progress information is important - For uploads/downloads, update the progress value frequently for smooth animation