ControlModel class

Base class within to implement Business logic. This class is typically extended by custom BL Models to provide homogenous API through all code base. Pass init args right after constructor to configure this model. Comes with DisposeHandler so we can control how dispose will be handled. When not restricted, init and dispose can be called multiple times during lifecycle of this model. More specific use is implemented within BaseControl and BaseModel.

Implemented types
Mixed-in types
Implementers
Available extensions

Constructors

ControlModel.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
preferSoftDispose bool
requestDispose will execute softDispose. Useful for items in list and objects stored in ControlFactory. Final dispose must be handled manually.
getter/setter pairinherited
preventDispose bool
requestDispose do nothing if set. Final dispose must be handled manually.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Used to clear and dispose object. Unsubscribe and close all sources. Prepare object for GC. Can be called multiple times!
override
disposeWith(DisposeObserver observer) → void

Available on Disposable, provided by the DisposableExt extension

Register for dispose with given observer.
init(Map args) → void
Init is typically called right after constructor. args - these arguments are typically passed through factory.
override
mount(Object? object) → void
Used to register interface/handler/notifier etc. Can be called multiple times with different objects!
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestDispose([Object? sender]) → void
Executes dispose based on preventDispose and preferSoftDispose settings. sender - actual object that requesting dispose - can be null.
inherited
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.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited