Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 6520513

Browse files
caitpjbdeboer
authored andcommitted
docs(Scope): explain :: and : expression notation
1 parent 2d8fc53 commit 6520513

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/core/scope.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ class Scope {
192192
* Use [watch] to set up change detection on an expression.
193193
*
194194
* * [expression]: The expression to watch for changes.
195+
* Expressions may use a special notation in addition to what is supported by the parser.
196+
* In particular:
197+
* - If an expression begins with '::', it is unwatched as soon as it evaluates to a non-null
198+
* value.
199+
* - If an expression begins with ':', it only calls the [reactionFn] if the expression
200+
* evaluates to a non-null value.
195201
* * [reactionFn]: The reaction function to execute when a change is detected in the watched
196202
* expression.
197203
* * [context]: The object against which the expression is evaluated. This defaults to the

0 commit comments

Comments
 (0)