Skip to content

Instance Method

withActivityIndicator(refreshRate:_:)

Starts the ActivityIndicator and stops it after the provided body completes.
@discardableResult func withActivityIndicator<T>(refreshRate: Int = 40, _ body: nonisolated(nonsending) @Sendable () async throws -> T) async rethrows -> T

Parameters

refreshRate

The time interval (specified in milliseconds) to use when updating the activity.

body

The asynchronous body to execute while the activity indicator is running.