SnapTarget class

A simple class for organising pivot values. Your view will snap to your bound through the closest SnapTarget.viewPivot and SnapTarget.boundPivot match. For example, consider the following: I) SnapTarget.viewPivot = (0.1, 0.1) II) SnapTarget.boundPivot = (0.75, 0.75) These values determine that your view will snap to your bound at: I) The coordinate of the view at (10% SnapControllerState.viewWidth, 10% SnapControllerState.viewHeight. II) The coordinate of the bound at (75% SnapControllerState.boundWidth, 75% SnapControllerState.boundHeight. (All values consider the coordinate plane to start at (0,0) from the top left corner of the view or the bound.) See the provided example for further clarification.

Constructors

SnapTarget(Offset viewPivot, Offset boundPivot)
const

Properties

boundPivot Offset
final
viewPivot Offset
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited