streamConnectionChanges method
Implementation
Stream<ConnectionDetails> streamConnectionChanges({bool immediately = false}) {
if (immediately) {
Future.delayed(const Duration(milliseconds: 50), () {
_connectionWithServerChangesStreamController.add(
ConnectionDetails(_connectionStatus, disconnectionReason));
});
}
return _connectionWithServerChangesStreamController.stream;
}