getAngles method
Calculates and returns a list of the angles where ticks should be.
segment
is the segment the tick angles are generated for.
Implementation
List<double>? getAngles(RadialGaugeSegment segment,
{RadialTicks? parentTicks}) {
if (_cachedTickValues == null) getValues(segment, parentTicks: parentTicks);
if (_cachedTickAngles == null) {
if (anglesBuilder != null) {
_cachedTickAngles = anglesBuilder!(segment, this, _cachedTickValues);
} else {
final angleInc = (segment.maxAngle - segment.minAngle) /
(segment.maxValue - segment.minValue);
_cachedTickAngles = _cachedTickValues!
.map((i) => segment.minAngle + (i - segment.minValue) * angleInc)
.toList();
}
}
return _cachedTickAngles;
}