reachability
3 notes.
Flutter: Check Internet Connection with connectivity_plus
To check the internet connection in a Flutter app, use the connectivity_plus package. It tells you whether the phone is on Wi-Fi, mobile data or no network at all, and when that changes. It can't tell you the internet actually works, so your requests still need to handle failure.
SwiftUI: Check Internet Connection with NWPathMonitor
To check the internet connection in a SwiftUI app, use NWPathMonitor from the Network framework. It tells you whether a network path is available, whether it is expensive or in Low Data Mode, and when any of that changes. It can't tell you the internet is actually reachable, so your requests still need to handle failure.
iOS: Check whether internet connection is available
Updated for 2026: this tutorial is from 2012. For a current version in SwiftUI, see SwiftUI: Check Internet Connection with NWPathMonitor. Here, i am just checking whether network…