Class
ActivityIndicator
An instance of a
ActivityIndicatorType that can be started, failed, and succeeded.final class ActivityIndicator<A> where A : ActivityIndicatorType
Overview
Use newActivity(for:) on ActivityIndicatorType to create one.
let loadingBar = console.loadingBar(title: "Loading")
try await foo.withActivityIndicator {
try await Task.sleep(for: .seconds(2.5))
}
Topics
Instance Properties
activityThe genericActivityIndicatorTypepowering thisActivityIndicator.
Instance Methods
withActivityIndicator(refreshRate:_:)Starts theActivityIndicatorand stops it after the provided body completes.
Relationships
Conforms To
Swift.SendableSwift.SendableMetatype
See Also
Activity
ActivityIndicatorTypeActivityIndicatorTypes are responsible for drawing / rendering the currentActivityIndicatorStateto theConsole.ActivityIndicatorStatePossible states to draw / render andActivityIndicatorType.ActivityBarAnActivityIndicatorTypethat renders an activity bar on a single line.LoadingBarLoading-style implementation ofActivityBar.ProgressBarProgress-style implementation ofActivityBar.CustomActivityAn activity indicator with customizable frames and success and failure messages.