DesignTimeScale class

Time, in local dates: min at start, max at end. Its values are milliseconds since the epoch (DateTime.millisecondsSinceEpoch); its ticks fall on calendar steps (seconds to years) and read as the reader's times and dates.

DesignTimeScale(min: DateTime(2026), max: DateTime(2026, 12), start: 0, end: 300)
Inheritance

Constructors

DesignTimeScale({required DateTime min, required DateTime max, required double start, required double end})
A scale from min to max exactly.
DesignTimeScale.nice({required DateTime min, required DateTime max, required double start, required double end, int tickCount = 5})
A scale widened to the calendar steps around min and max that give about tickCount ticks (a month's first day, a year's).
factory

Properties

end → double
The position of the greatest value.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
max → DateTime
The latest time.
final
min → DateTime
The earliest time.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
start → double
The position of the least value (left, or right when the scale runs right to left; the bottom of a y scale).
finalinherited

Methods

invert(double position) → double
The value at position.
override
label(DesignLocalizations localizations, DateTime time) → String
time labelled as a tick on a scale this long would be: a time of day within a day or two, a month and day within months, a month within years (January as its year), a year beyond.
map(double value) → double
The position of value.
override
mapDate(DateTime time) → double
The position of time.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ticks(DesignLocalizations localizations, {int count = 5}) → List<DesignScaleTick>
About count ticks across the scale, labelled for localizations.
override
toString() → String
A string representation of this object.
override

Operators

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