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.
lerp(double a, double b, double t) double
lerp.
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.
tickFractions(int? divisions) List<double>
Tick fractions when divisions > 0 (Compose stepssteps + 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.