DurabilityPolicy enum

Timeline durability and state preservation policies across dormant deactivations.

Governs how a DurableAnimationController manages accumulated progress, elapsed duration, and staged physics simulations when its host widget unmounts, navigates away, or enters dormancy.

System Architectural Flow

                    ┌────────────────────────────────────────┐
                    │            DurabilityPolicy            │
                    └────────────────────────────────────────┘
                                         │
       ┌─────────────────────────────────┼─────────────────────────────────┐
       ▼                                 ▼                                 ▼
┌──────────────┐                 ┌──────────────┐                  ┌──────────────┐
│    resume    │                 │   catchUp    │                  │    reset     │
└──────┬───────┘                 └──────┬───────┘                  └──────┬───────┘
       │                                │                                 │
       │ Freezes progress locally       │ Measures Δt = clock() - t_dorm  │ Resets value to
       │ Resumes exact progress         │ Compensates elapsed kinematics  │ initial lowerBound
       ▼                                ▼                                 ▼
[Same Coordinate on Wake]        [Compensated Progress on Wake]    [Baseline on Wake]
Inheritance
Available extensions

Values

resume → const DurabilityPolicy

Resumes animation playback from the exact progress and state at the time of deactivation.

Freezes parameter coordinates and animation progress locally during dormant unmounts, seamlessly resuming playback from the exact frozen value when reactivated.

This is the default policy, ideal for standard UI transitions (e.g., accordion expansions, modal sheets, dropdowns, and route transitions).

catchUp → const DurabilityPolicy

Calculates the wall-clock time elapsed while dormant and catches up to real time upon reactivation.

Ideal for continuous real-time indicators (e.g., radar sweeps, clocks, and live telemetry feeds).

reset → const DurabilityPolicy

Discards progress upon deactivation and resets back to initial parameter values upon reactivation.

Ideal for transient entrance effects or animations that must restart fresh upon re-entry.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
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.
inherited

Operators

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

Constants

values → const List<DurabilityPolicy>
A constant List of the values in this enum, in order of their declaration.