dispose static method

  1. @Deprecated('Use `SubscriptionMixin` instead')
void dispose(
  1. BuildContext? context
)

Implementation

@Deprecated('Use `SubscriptionMixin` instead')
static void dispose(BuildContext? context) {
  if (context != null && _streamMaps.isNotEmpty) {
    var streams = _streamMaps[context];
    if (streams != null) {
      for (final stream in streams) {
        stream.cancel();
      }
      streams.clear();
      streams = null;
    }
  }
}