We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77bb1ce commit d61220cCopy full SHA for d61220c
packages/bloc/lib/src/bloc_base.dart
@@ -21,6 +21,11 @@ abstract class Closable {
21
/// Closes the current instance.
22
/// The returned future completes when the instance has been closed.
23
FutureOr<void> close();
24
+
25
+ /// Whether the object is closed.
26
+ ///
27
+ /// An object is considered closed once [close] is called.
28
+ bool get isClosed;
29
}
30
31
/// An object that can emit new states.
@@ -72,6 +77,7 @@ abstract class BlocBase<State>
72
77
///
73
78
/// A bloc is considered closed once [close] is called.
74
79
/// Subsequent state changes cannot occur within a closed bloc.
80
+ @override
75
81
bool get isClosed => _stateController.isClosed;
76
82
83
/// Updates the [state] to the provided [state].
0 commit comments