NIB / DOCUMENTATION
Circular loader — NibComponents
Show indeterminate activity with explicit pause and static reduced-motion feedback.
Open interactive viewUse a loader for unknown duration
NibCircularLoader paints a rotating gradient sweep over a track. It communicates indeterminate activity; it does not show a completion percentage. The preview explicitly says that no upload or background task is running. The website starts the actual package loader rotating; press Pause indicator to stop it.
The demo wraps the loader in TickerMode for a user-controlled pause. This is host composition: NibCircularLoader has no animated or paused constructor argument. The Run control changes that wrapper, and the copied source includes it.
Configure the painted ring
size is the overall diameter, strokeWidth sets ring thickness, and color defaults to NibTheme.primary. trackColor defaults to a low-opacity form of the resolved color. child places a small widget in the center.
duration controls one full rotation and defaults to 1100 milliseconds. sweep is a fraction strictly between 0 and 1 and defaults to 0.72. Keep strokeWidth sensible relative to size. Changing duration resets and restarts the current rotation in this implementation.
Name the activity and respect reduced motion
The loader does not supply an accessible task name on its own. This preview labels the decorative indicator and replaces it with static Working text when MediaQuery.disableAnimations is true. In an application, name the actual activity and announce only meaningful status changes.
The package loader does not itself check reduced motion. TickerMode can silence its ticker in a hidden or paused host, but it does not cancel a request or complete work. Remove the loader when the host operation finishes and keep failure feedback visible.
Keep the lifetime bounded
The package owns and disposes its AnimationController. The demo has no timer or backend subscription. The website starts it running and provides both the local Pause indicator control and the shared motion pause. Disposing the example ends its ticker lifetime.
A widget test can check the pause and reduced-motion branches. Physical-device frame pacing remains a separate check; this preview makes no GPU or performance certification claim.