DisposeHandler mixin
Handles dispose in multiple ways.
Use requestDispose to handle dispose execution. preventDispose - do nothing. Final dispose must be called manually. preferSoftDispose - executes softDispose. Useful for items in list and objects stored in ControlFactory. Final dispose must be handled manually.
dispose can be still called directly.
- Implemented types
- Mixin Applications
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- preferSoftDispose ↔ bool
-
requestDispose will execute softDispose. Useful for items in list and objects store in ControlFactory. Final dispose must be handled manually.
getter/setter pair
- preventDispose ↔ bool
-
requestDispose do nothing if set. Final dispose must be handled manually.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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!
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestDispose(
[dynamic parent]) → void -
Executes dispose based on preventDispose and preferSoftDispose settings.
parent
- actual object that requesting dispose. -
softDispose(
) → void - Just soft dispose - stop loading / subscriptions etc. For example called when List item hides and is recycled. Also useful when Control is used with multiple Widgets to prevent fatal dispose.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
disposeOf(
dynamic object, dynamic parent) → void