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
-
- Object
- DesignScale
- DesignTimeScale
Constructors
- DesignTimeScale({required DateTime min, required DateTime max, required double start, required double end})
-
A scale from
mintomaxexactly. - 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
minandmaxthat give abouttickCountticks (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 -
timelabelled 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
countticks across the scale, labelled forlocalizations.override -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited