Skip to content

ProgressBar

Linear progress bar widget displaying determinate or indeterminate completion state.

Overview

ProgressBar provides visual feedback on task completion through determinate percentage fills or indeterminate animated activity indicators.

Key features: - Configurable value ranges with min, max, and current value. - Smooth progress computation (progress()). - Indeterminate mode for tasks with unknown completion time. - Customizable track and indicator styling.

Setting Up Determinate and Indeterminate Progress Bar

ProgressBar bar = new ProgressBar();
bar.range(0.0f, 100.0f).value(45.0f);
  • LoadingIndicator: Highly configurable loading animation widget supporting ring, bar, pulse, and dots indicator modes.

API

ProgressBar()

Constructs a ProgressBar with default [0, 100] range and styling.

ProgressBar::indeterminate()

Returns true if indeterminate animation mode is enabled.

Returns boolean: True if operating in indeterminate mode..

ProgressBar::indeterminate(boolean)

Enables or disables indeterminate continuous activity animation.

Parameter Type Description
indeterminate boolean Whether the progress bar operates in indeterminate mode.

Returns ProgressBar: This widget instance for chaining..

ProgressBar::max()

Returns the maximum progress value.

Returns float: Current normalized progress between 0.0 and 1.0..

ProgressBar::max(float)

Sets the maximum progress value.

Parameter Type Description
max float Maximum range bound.

Returns ProgressBar: This widget instance for chaining..

ProgressBar::min()

Returns the minimum progress value.

Returns float: Current normalized progress between 0.0 and 1.0..

ProgressBar::min(float)

Sets the minimum progress value.

Parameter Type Description
min float Minimum range bound.

Returns ProgressBar: This widget instance for chaining..

ProgressBar::progress()

Returns the normalized progress ratio between 0.0 and 1.0.

Returns float: Current normalized progress between 0.0 and 1.0..

ProgressBar::range(float, float)

Sets both minimum and maximum bounds simultaneously.

Parameter Type Description
min float Minimum range bound.
max float Maximum range bound.

Returns ProgressBar: This widget instance for chaining..

ProgressBar::value()

Returns the current numeric progress value.

Returns float: Current normalized progress between 0.0 and 1.0..

ProgressBar::value(float)

Sets the current numeric progress value, clamped to [min, max].

Parameter Type Description
value float Progress value.

Returns ProgressBar: This widget instance for chaining..