DotStepper constructor

DotStepper({
  1. required int activeStep,
  2. int dotCount = 2,
  3. double dotRadius = 24,
  4. double spacing = 0.0,
  5. Axis direction = Axis.horizontal,
  6. Shape shape = Shape.circle,
  7. Indicator indicator = Indicator.shift,
  8. FixedDotDecoration fixedDotDecoration = const FixedDotDecoration(),
  9. IndicatorDecoration indicatorDecoration = const IndicatorDecoration(),
  10. LineConnectorDecoration lineConnectorDecoration = const LineConnectorDecoration(),
  11. bool tappingEnabled = true,
  12. bool lineConnectorsEnabled = false,
  13. 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',
  );
}