dispose static method

void dispose()

You need to call this method to release resources when you exit the entire application.

Implementation

static void dispose() {
  listeners.clear();
  assert(_subscription != null);
  _subscription!.cancel();
}