ComicMotion class
Comic's motion: a page being turned, quick and snappy, with a small overshoot where a panel pops. A press lands in press; a control's state (a switch's thumb, a check inked in, a selected segment) moves in state; what moves across the page in move; what pops over it in raise (a dialog, a menu), or travel from the page's foot (a sheet), and leaves in leave. Under Reduce Motion, and in every shot, each is a cut: read them through of or durationOf.
- Annotations
Constructors
- ComicMotion({Duration press = const Duration(milliseconds: 80), Duration state = const Duration(milliseconds: 120), Duration move = const Duration(milliseconds: 160), Duration raise = const Duration(milliseconds: 200), Duration travel = const Duration(milliseconds: 260), Duration leave = const Duration(milliseconds: 110), Duration spinner = const Duration(milliseconds: 1000), Duration progress = const Duration(milliseconds: 1100), Duration pulse = const Duration(milliseconds: 900), Curve enter = Curves.easeOutBack, Curve exit = Curves.easeInCubic, Curve standard = Curves.easeInOutCubic})
-
Creates a ComicMotion.
const
Properties
- enter → Curve
-
How something arrives, how it goes, and how it moves between two places.
final
- exit → Curve
-
How something arrives, how it goes, and how it moves between two places.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- leave → Duration
-
Something leaving: quicker than it came.
final
- move → Duration
-
Something moving within the page: a plate to the selected tab.
final
- press → Duration
-
A press landing.
final
- progress → Duration
-
One sweep of an indeterminate progress strip.
final
- pulse → Duration
-
One fade of a skeleton placeholder.
final
- raise → Duration
-
A raised surface arriving: a menu, a dialog.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spinner → Duration
-
One turn of an indeterminate circular indicator.
final
- standard → Curve
-
How something arrives, how it goes, and how it moves between two places.
final
- state → Duration
-
A control turning to its new state: a tick inked in, a switch thrown.
final
- travel → Duration
-
A sheet arriving from the page's foot.
final
Methods
-
copyWith(
{Duration? press, Duration? state, Duration? move, Duration? raise, Duration? travel, Duration? leave, Duration? spinner, Duration? progress, Duration? pulse, Curve? enter, Curve? exit, Curve? standard}) → ComicMotion - This with the supplied timing or curves replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
durationOf(
BuildContext context, Duration d) → Duration -
d, or a cut where motion is off atcontext. -
lerp(
ComicMotion a, ComicMotion b, double t) → ComicMotion - Timings interpolate; curves switch at the midpoint.
-
of(
BuildContext context) → ComicMotion -
The tokens in force at
context: still under Reduce Motion, whichever platform asked (ui_core'sdesignReduceMotionOf: Android's Remove animations, the web's prefers-reduced-motion, iOS's Reduce Motion).contextbuilds again when it changes; iOS's change comes as a build, so read it inbuildor as you act.
Constants
- still → const ComicMotion
- The same tokens with every duration a cut.