DotStepper constructor
DotStepper({
- required int activeStep,
- int dotCount = 2,
- double dotRadius = 24,
- double spacing = 0.0,
- Axis direction = Axis.horizontal,
- Shape shape = Shape.circle,
- Indicator indicator = Indicator.shift,
- FixedDotDecoration fixedDotDecoration = const FixedDotDecoration(),
- IndicatorDecoration indicatorDecoration = const IndicatorDecoration(),
- LineConnectorDecoration lineConnectorDecoration = const LineConnectorDecoration(),
- bool tappingEnabled = true,
- bool lineConnectorsEnabled = false,
- OnDotTapped? onDotTapped,
Implementation
DotStepper({
required this.activeStep,
this.dotCount = 2,
this.dotRadius = 24,
this.spacing = 0.0,
this.direction = Axis.horizontal,
this.shape = Shape.circle,
this.indicator = Indicator.shift,
this.fixedDotDecoration = const FixedDotDecoration(),
this.indicatorDecoration = const IndicatorDecoration(),
this.lineConnectorDecoration = const LineConnectorDecoration(),
this.tappingEnabled = true,
this.lineConnectorsEnabled = false,
this.onDotTapped,
}) {
assert(dotCount >= 2, 'It does not make sense to have less than 2 dots.');
assert(dotRadius >= 6.0, 'The minimum value allowed for dot radius is 6.0');
assert(spacing >= 0.0, 'spacing must be greater than or equal to 0.0');
assert(
activeStep >= 0 && activeStep < dotCount,
'activeStep must be greater than or equal to 0 and less than dotCount',
);
}