GlassDropStretchDriver class Foundations

Runs a GlassDropStretch off a ticker while its drop moves, and says when the deformation changed. The package's controls' half of the mechanism.

Woken by the owner when the drop's position changes; stops itself once the drop is still and the stretch has sprung back. A finger holding a drop still therefore costs no frames.

It starts with GlassDropMotion.none: set motion from the control's build, usually through GlassDropMotion.resolve.

Inheritance

Constructors

GlassDropStretchDriver({required TickerProvider vsync, required double position()})
A driver that reads the drop through position on vsync's ticker.

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
isActive → bool
Whether the ticker is running.
no setter
motion ↔ GlassDropMotion
The spec the stretch follows. Setting GlassDropMotion.none stops the ticker and puts the drop back to round at once.
getter/setter pair
position → double Function()
Where the drop is now, logical px along its travel.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → double
The deformation to draw.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object.
override
jump() → void
The drop is where it is without having travelled there. See GlassDropStretch.jump.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() → String
A string representation of this object.
inherited
wake() → void
The drop moved, or is about to: sample it every frame until it settles.

Operators

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