VerticalSeekBarRenderBox constructor

VerticalSeekBarRenderBox(
  1. Color lineColor,
  2. int thumbSize,
  3. Color thumbColor, {
  4. int defaultProgress = 0,
  5. int lineWidth = 0,
  6. SeekBarStarted? seekBarStarted,
  7. SeekBarProgress? seekBarProgress,
  8. SeekBarFinished? seekBarFinished,
  9. bool scaleWhileDrag = true,
  10. int percentSplit = 0,
  11. int percentSplitHeight = 0,
  12. Color percentSplitColor = Colors.transparent,
  13. bool autoJump2Split = true,
  14. bool fillProgress = false,
})

Implementation

VerticalSeekBarRenderBox(
  this.lineColor,
  this.thumbSize,
  this.thumbColor, {
  this.defaultProgress = 0,
  this.lineWidth = 0,
  this.seekBarStarted,
  this.seekBarProgress,
  this.seekBarFinished,
  this.scaleWhileDrag = true,
  this.percentSplit = 0,
  this.percentSplitHeight = 0,
  this.percentSplitColor = Colors.transparent,
  this.autoJump2Split = true,
  this.fillProgress = false,
}) {
  progress = defaultProgress * 1.0 / 100;
  if (percentSplit > 100) {
    percentSplit = 0;
  }

  _drag = VerticalDragGestureRecognizer()
    ..onStart = (DragStartDetails details) {
      _startDragThumbPosition(details.localPosition);
    }
    ..onUpdate = (DragUpdateDetails details) {
      _updateDragThumbPosition(details.localPosition);
    }
    ..onCancel = () {
      _finishDragThumbPosition();
    }
    ..onEnd = (_) {
      _finishDragThumbPosition();
    };
}