OudsLinearProgressIndicatorHelperText class
Optional helper text displayed below an OudsLinearProgressIndicator.
The helper text can show the progress value formatted as a percentage (progress), a custom label, or both at once.
Alignment rules
- progressAlignment and labelAlignment each control where their own
item is positioned (
start,centerorend) when that item is the only one displayed. - By default, only the progress percentage is shown, centered below the indicator (progressAlignment defaults to OudsProgressIndicatorHelperTextAlignment.center).
- When both progress and label would be displayed and one of them requests OudsProgressIndicatorHelperTextAlignment.center, that one is shown alone (centered) and the other is silently ignored — a centered item cannot share the line with another item.
- When both are displayed and neither requests
center, label is positioned according to labelAlignment —startorend— and the progress percentage automatically takes the opposite side (progressAlignment is ignored in that case).
The progress percentage is never shown when the indicator is
indeterminate (progressType: OudsProgressIndicatorType.indeterminate),
since there is no meaningful value to format — only label is displayed
in that case.
Example
OudsLinearProgressIndicator(
value: 0.75,
helperText: OudsLinearProgressIndicatorHelperText(
label: 'Uploading file',
labelAlignment: OudsProgressIndicatorHelperTextAlignment.end,
),
)
Constructors
- OudsLinearProgressIndicatorHelperText({bool progress = true, String? label, OudsProgressIndicatorHelperTextAlignment labelAlignment = OudsProgressIndicatorHelperTextAlignment.end, OudsProgressIndicatorHelperTextAlignment progressAlignment = OudsProgressIndicatorHelperTextAlignment.start})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- label → String?
-
Optional label displayed alongside (or instead of) the progress
percentage.
final
- labelAlignment → OudsProgressIndicatorHelperTextAlignment
-
Horizontal alignment for the custom label when it is the only item
displayed, or the side it takes (
start/end) when both the label and the progress percentage are displayed together.final - progress → bool
-
Whether the progress value, formatted as a percentage, is displayed.
Ignored (never shown) when the indicator is indeterminate.
final
- progressAlignment → OudsProgressIndicatorHelperTextAlignment
-
Horizontal alignment for the progress percentage when it is the only
item displayed. Ignored when label is also displayed and
non-centered, in which case the progress percentage automatically takes
the side opposite labelAlignment.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited