From 2f8662309d405714b2dc8ff2bf894043844e2885 Mon Sep 17 00:00:00 2001 From: Aqluse Date: Mon, 8 Nov 2021 03:55:43 +0300 Subject: [PATCH] fix: isBroadcast has been moved to StateStream to use its inner stream broadcast check to avoid extra assert statement instead of defining more constructions to introduce private stream to the mixin and adding extra assert for it --- packages/core_bloc/lib/src/state_stream.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core_bloc/lib/src/state_stream.dart b/packages/core_bloc/lib/src/state_stream.dart index 03e6b670..59c2ca6b 100644 --- a/packages/core_bloc/lib/src/state_stream.dart +++ b/packages/core_bloc/lib/src/state_stream.dart @@ -15,6 +15,10 @@ class StateStream extends Stream final Stream _stream; + /// This stream is always broadcast + @override + bool get isBroadcast => true; + @override StreamSubscription listen( void Function(State state)? onData, { @@ -31,10 +35,6 @@ class StateStream extends Stream } mixin _StateStreamMixin on Stream { - /// This stream is always broadcast - @override - bool get isBroadcast => true; - /// This transformer is a shorthand for Stream.where followed by Stream.cast. /// /// [State]'s that do not match [T] are filtered out,