TickerComponent mixin

Mixin for ControlModel to pass TickerProvider from CoreWidget - ControlWidget or ControllableWidget. Enables to construct AnimationController and control animations.

Typically used as private ControlModel next to Widget class. This solution helps to separate animation/UI logic, actual business logic and pure UI.

Also Widget must use TickerControl or SingleTickerControl to enable vsync provider or pass TickerProvider from other place by calling provideTicker.

Superclass Constraints

Properties

hashCode int
The hash code for this object.
no setterinherited
isTickerAvailable bool
Checks if TickerProvider is set.
no setter
preferSoftDispose bool
requestDispose will execute softDispose. Useful for items in list and objects store 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
ticker TickerProvider?
Returns active TickerProvider provided by Widget or passed by other Control.
no setter

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
init(Map args) → void
Init is typically called right after constructor by framework. args - Arguments passed from parent or through Factory.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onTickerInitialized(TickerProvider ticker) → void
Callback after provideTicker is executed. Serves to created AnimationController and to set initial animation state.
provideTicker(TickerProvider ticker) → void
Sets vsync. Called by framework during State initialization when used with CoreWidget and TickerControl.
register(dynamic object) → void
Used to register interface/handler/notifier etc. Can be called multiple times with different objects!
override
requestDispose([dynamic parent]) → void
Executes dispose based on preventDispose and preferSoftDispose settings. parent - actual object that requesting dispose.
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