onClose method

  1. @override
void onClose()
override

Implementation

@override
void onClose() {
  super.onClose();

  // workaround for https://github.com/dart-lang/sdk/issues/27414
  if (subscription != null) {
    subscription!.cancel();
    subscription = null;
  }
}