Skip to content

Commit 72be30c

Browse files
committed
add note in docs for methods listen and listenState
1 parent 0bcee0e commit 72be30c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/yx_scope/lib/src/core/scope_state_holder.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ class ScopeStateHolder<Scope> {
5050
/// The [listener] callback will be called immediately on addition and
5151
/// synchronously whenever [state] changes.
5252
///
53+
/// Note: This method only calls the callback when the state is [ScopeStateAvailable]
54+
/// (passing the scope object) or when the scope is [ScopeStateNone] (passing null).
55+
/// It doesn't trigger for [ScopeStateInitializing] or [ScopeStateDisposing] states.
56+
///
5357
/// Set [emitImmediately] to true if you want to an immediate execution
5458
/// of the [listener] with the current state.
5559
///
@@ -77,6 +81,8 @@ class ScopeStateHolder<Scope> {
7781
/// The [listener] callback will be called immediately on addition and
7882
/// synchronously whenever [state] changes.
7983
///
84+
/// Note: This method emits on every [ScopeState] change.
85+
///
8086
/// Set [emitImmediately] to true if you want to an immediate execution
8187
/// of the [listener] with the current state.
8288
///

0 commit comments

Comments
 (0)