TimelineFormat class abstract final

The timeline file format: its current version, and bringing an older file up to it.

Used for timeline files (.timeline.json) and for the inline timelines a TimelinePlayerComponent keeps inside a scene.

Properties

hashCode → int
The hash code for this object.
no setterinherited
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

Static Methods

ensureSupported(int version) → void
Throws an UnsupportedFormatVersionException when version is newer than current: this engine cannot know what the newer format added, and saving what it did understand would quietly drop the rest.
migrate(Map<String, dynamic> json, {MigrationHooks? hooks}) → Map<String, dynamic>
json brought up to current — a new map, typed as jsonDecode types a file; json is never changed — with the packages' rules in hooks (none when null). One already at current is returned as it is.
versionOf(Map<String, dynamic> json) → int
The version json says it is — 1 when it says nothing, as the first files did not. Throws a FormatException when formatVersion is not a whole number from 0 up.

Constants

chain → const List<TimelineMigration>
Every step, in order.
current → const int
The version this engine writes.