Skip to content

Spinner

Animated loading indicator: a cycling glyph with an optional label beside it.

See also: ProgressBar when progress can be measured.

Learn more: Animation

Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.

Spinner(label: 'Connecting')

Use it for work whose progress can’t be measured. The glyph advances every frameInterval. Every spinner shares the app’s animation timer, so showing many at once stays cheap. A spinner holds its current glyph while animation is paused around it, such as under TickerMode(enabled: false).

ParameterTypeDefaultDescription
style:SpinnerStyleSpinnerStyle.brailleGlyph set to cycle through.
label:String?—Optional label rendered to the right of the glyph, separated by a single space.
frameInterval:Durationconst Duration(milliseconds: 80)How long to hold each frame. Defaults to 80 ms, which is the rate most spinner implementations agree on as “smooth without being distracting.”
cellStyle:CellStyleCellStyle.noneCell style applied to the rendered text.

Spinner is defined in packages/fleury/lib/src/widgets/spinner.dart.

Category: Charts & meters · All widgets