VelocityEstimate class
A two dimensional velocity estimate.
VelocityEstimates are computed by VelocityTracker.getVelocityEstimate. An estimate's confidence measures how well the velocity tracker's position data fit a straight line, duration is the time that elapsed between the first and last position sample used to compute the velocity, and offset is similarly the difference between the first and last positions.
See also:
- VelocityTracker, which computes VelocityEstimates.
- Velocity, which encapsulates (just) a velocity vector and provides some useful velocity operations.
Constructors
- VelocityEstimate({required Offset pixelsPerSecond, required double confidence, required Duration duration, required Offset offset})
-
Creates a dimensional velocity estimate.
const
Properties
- confidence → double
-
A value between 0.0 and 1.0 that indicates how well VelocityTracker
was able to fit a straight line to its position data.
final
- duration → Duration
-
The time that elapsed between the first and last position sample used
to compute pixelsPerSecond.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- offset → Offset
-
The difference between the first and last position sample used
to compute pixelsPerSecond.
final
- pixelsPerSecond → Offset
-
The number of pixels per second of velocity in the x and y directions.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited