SharedReachability

This class is responsible for managing the lifecycle of the PlatformReachability instance. It will start and stop the reachability instance based on the number of subscribers to the networkStatus and isReachable properties.

This class can be used as a singleton or as a property of a class.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val isReachable: StateFlow<Boolean>

Returns state flow with network reachability state. True if network available.

Link copied to clipboard

Returns state flow with network status.