close method

  1. @override
Future<void> close()
override

Closes the instance. This method should be called when the instance is no longer needed. Once close is called, the instance can no longer be used.

Implementation

@override
Future<void> close() async {
  WidgetsBinding.instance.removeObserver(this);
  await _themeSubscription?.cancel();
  _themeRepository.dispose();
  await super.close();
}