M3ESliderMath class abstract final

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..1 fraction of value within min..max.
isNavigationKey(LogicalKeyboardKey key) → bool
Whether key drives keyboard value changes (arrows, page, home/end).
keyboardStep(double min, double max, int? divisions, {required bool coarse}) → double
Arrow step, or the Space+arrow step when coarse is true.
lerp(double a, double b, double t) → double
lerp.
pageStep(double step, int? divisions) → double
Larger keyboard step: one division, or 10% of the range when continuous.
snap(double value, double min, double max, int? divisions) → double
Snaps value to the nearest division step.
snapFraction(double fraction, List<double> ticks) → double
Closest tick fraction to fraction, or fraction when there are none.
stepSize(double min, double max, int? divisions) → double
Single keyboard step: one division, or 1% of the range when continuous.
tickFractions(int? divisions) → List<double>
Tick fractions when divisions > 0 (Compose steps → steps + 2 marks).
valueFromFraction(double fraction, double min, double max) → double
Maps a 0..1 fraction back into min..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.