onDispose method

  1. @override
Future<Null> onDispose()

Callback to allow arbitrary cleanup on dispose.

Implementation

@override
// ignore: prefer_void_to_null
Future<Null> onDispose() async {
  if (_isInitialized) {
    _unregisterListeners();
  }
}