NumberLine.fromConfig constructor
NumberLine.fromConfig(
- AxisConfig config, {
- double xMin = -FRAME_X_RADIUS,
- double xMax = FRAME_X_RADIUS,
Implementation
factory NumberLine.fromConfig(
AxisConfig config, {
double xMin = -FRAME_X_RADIUS,
double xMax = FRAME_X_RADIUS,
}) =>
NumberLine(
color: config.color ?? LIGHT_GRAY,
unitSize: config.unitSize ?? 1,
includeTicks: config.includeTicks ?? true,
tickSize: config.tickSize ?? 0.1,
tickFrequency: config.tickFrequency ?? 1,
leftmostTick: config.leftmostTick,
numbersWithElongatedTicks: config.numbersWithElongatedTicks ?? [0],
includeNumbers: config.includeNumbers ?? false,
numbersToShow: config.numbersToShow,
longTickMultiple: config.longTickMultiple ?? 2,
numberAtCenter: config.numberAtCenter ?? 0,
numberScaleVal: config.numberScaleVal ?? 0.75,
labelDirection: config.labelDirection ?? DOWN,
lineToNumberBuff: config.lineToNumberBuff ?? MED_SMALL_BUFFER,
includeTip: config.includeTip ?? true,
tipWidth: config.tipWidth ?? 0.25,
tipHeight: config.tipHeight ?? 0.25,
decimalNumberConfig: config.decimalNumberConfig,
excludeZeroFromDefaultNumbers:
config.excludeZeroFromDefaultNumbers ?? true,
xMax: xMax,
xMin: xMin,
)..setStroke(width: config.strokeWidth ?? DEFAULT_STROKE_WIDTH);