streamConnectionChanges method

Stream<ConnectionDetails> streamConnectionChanges({
  1. bool immediately = false,
})

Implementation

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