internetConnectState method
Implementation
@override
Stream<bool> internetConnectState() async* {
print("simple connection checker $_simpleConnectionChecker");
StreamController<bool> streamController = new StreamController();
subscription =
_simpleConnectionChecker.onConnectionChange.listen((connected) {
print("this is connected $connected");
if (connected) {
streamController.add(true);
} else {
streamController.add(false);
}
});
yield* streamController.stream;
}