Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #39 from Aqluse/safe-broadcast-check
Browse files Browse the repository at this point in the history
Unreliable isBroadcast logic
  • Loading branch information
PlugFox authored Nov 8, 2021
2 parents 42b1836 + 2f86623 commit 0063567
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core_bloc/lib/src/state_stream.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ class StateStream<State extends Object?> extends Stream<State>

final Stream<State> _stream;

/// This stream is always broadcast
@override
bool get isBroadcast => true;

@override
StreamSubscription<State> listen(
void Function(State state)? onData, {
Expand All @@ -31,10 +35,6 @@ class StateStream<State extends Object?> extends Stream<State>
}

mixin _StateStreamMixin<State extends Object?> on Stream<State> {
/// 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,
Expand Down

0 comments on commit 0063567

Please sign in to comment.