close method

Future<void> close()

Close the cubit and release resources.

Implementation

Future<void> close() async {
  _isClosed = true;
  await _connectivitySub?.cancel();
  _connectivitySub = null;
  await _controller.close();
}