dispose method

Future<void> dispose()

Disposes the account

Disables any ongoing autoRefresh and sets it to false. Also disposes of the internally used stream controller for idTokenStream.

Important: Even if you do not use any of the two properties mentioned above, you still have to always dispose of an account.

Implementation

Future<void> dispose() async {
  autoRefresh = false;
  if (!_refreshController.isClosed) {
    await _refreshController.close();
  }
}