dispose method

  1. @override
dynamic dispose()
override

销毁监听

Implementation

@override
dispose() {
  if (streamSubscription != null) {
    streamSubscription!.cancel();
    streamSubscription = null;
  }
}