Flight class final

How a hero that flies in place (HeroFlies.inPlace) flies in from where the node with its tag was: on a spring by default (the node's motion transition's, when it has one with a spring), or, with a duration, along a curve that rises lift (or liftShare of the distance, the larger) above the higher end (as Flutter's MaterialRectArcTween bends a hero's path), swelling to swell at the middle and spinning turns times (toward the way it flies), trailing trail fading dots.

Annotations
  • @immutable

Constructors

Flight({int duration = 0, AnimationCurve curve = AnimationCurve.easeInOut, double lift = 0, double liftShare = 0, double swell = 1, double turns = 0, int trail = 0, Color trailColor = const Color(0xFFFFC83D)})
const

Properties

curve → AnimationCurve
final
duration → int
The flight's length (ms); 0 flies on the node's spring.
final
hashCode → int
The hash code for this object.
no setterinherited
lift → double
How far the path's control point rises above the higher end (px), or a share of the distance flown, whichever is larger; 0 and 0 fly straight.
final
liftShare → double
How far the path's control point rises above the higher end (px), or a share of the distance flown, whichever is larger; 0 and 0 fly straight.
final
props → List<Object?>
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
swell → double
The node's scale at the middle of the flight (1: none).
final
trail → int
Fading dots left behind (0: none), in trailColor.
final
trailColor → Color
final
turns → double
Whole turns over the flight, clockwise when flying right.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Json
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Object? json) → Flight?