AndroidDev, Android App Development, Android, Jetpack, Jetpack Compose.
will be calling it from the UI layer inside ViewModel. distinctUntilChanged() ensures that it sends new value only when Network Status changes to avoid sending unnecessary updates. In real cases that will usually be the case when you turn off the Airplane mode then you will get the callback