Shared fraction / snap helpers for M3ESlider and M3ERangeSlider.
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
-
clampRangeEnd(
double start, double end, double max) → double - clampRangeEnd.
-
clampRangeStart(
double start, double end, double min) → double - clampRangeStart.
-
fraction(
double value, double min, double max) → double -
0..1fraction ofvaluewithinmin..max. -
Whether
keydrives keyboard value changes (arrows, page, home/end). -
lerp(
double a, double b, double t) → double - lerp.
-
pageStep(
double step, int? divisions) → double - Coarser PageUp/PageDown step — ten stepSizes per page.
-
snap(
double value, double min, double max, int? divisions) → double -
Snaps
valueto the nearest division step. -
snapFraction(
double fraction, List< double> ticks) → double -
Closest tick fraction to
fraction, orfractionwhen there are none. -
stepSize(
double min, double max, int? divisions) → double - Single keyboard step: one division width, or 1% of the range when continuous.
-
tickFractions(
int? divisions) → List< double> -
Tick fractions when
divisions> 0 (Composesteps→steps + 2marks). -
valueFromFraction(
double fraction, double min, double max) → double -
Maps a
0..1fractionback intomin..max. -
valueFromOffset(
{required double localPrimary, required double extent, required double min, required double max, required int? divisions, required bool reverse}) → double - Local pointer position → value along the track axis.