isNewStream method

Future<bool> isNewStream()

Returns true, if the current stream negotiations resulted in a new stream. Useful for plugins to reset their cache in case of a new stream. The value only makes sense after receiving a StreamNegotiationsDoneEvent.

Implementation

Future<bool> isNewStream() async {
  final sm =
      getAttributes().getManagerById<StreamManagementManager>(smManager);

  return sm?.streamResumed == false;
}