import 'package:internet_connection_checker/internet_connection_checker.dart'; abstract class NetworkInfo { Stream<InternetConnectionStatus> get connectionStream; } class NetworkInfoImpl implements NetworkInfo { late InternetConnectionChecker connectionChecker = InternetConnectionChecker(); @override Stream<InternetConnectionStatus> get connectionStream => connectionChecker.onStatusChange; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter