DisposableToken class
DisposableClient is used at Client
side and DisposableToken at User
side.
- Available Extensions
Constructors
- DisposableToken(_DisposableClient _client, {dynamic data})
-
Propagates
thread
notifications with possibility to cancel operations. - DisposableToken.client({dynamic parent, VoidCallback? onCancel, VoidCallback? onFinish, VoidCallback? onDispose, dynamic data})
-
Propagates
thread
notifications with possibility to cancel operations.factory
Properties
- data ↔ dynamic
-
Additional data of this token.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isActive → bool
-
Checks if cancel or dispose hasn't been executed.
no setter
- isFinished → bool
-
Checks if finish has been executed.
no setter
- onCancel ↔ VoidCallback?
-
Callback when token is canceled and finish called.
getter/setter pairinherited
- onDispose ↔ VoidCallback?
-
Callback when token is disposed and finish called.
getter/setter pairinherited
- onFinish ↔ VoidCallback?
-
Callback when token is finished and finish called.
getter/setter pairinherited
- parent → dynamic
-
Parent of this disposer.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
[bool autoDispose = true]) → void - Cancels this token and notifies onCancel listener. Typically called by Client.
-
dispose(
) → void - Used to clear and dispose object. After this method call is object typically unusable and ready for GC. Can be called multiple times!
-
finish(
[bool autoDispose = true]) → void - Finishes this token and notifies onFinish listener. Typically called by API.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited