ScalePicker constructor

ScalePicker({
  1. required ValueChangedCallback onValueChange,
  2. required double width,
  3. required double height,
  4. bool isInvertedScale = false,
  5. Color backgroundColor = Colors.white,
  6. Color smallTickColor = Colors.black,
  7. required ScalePickerController scalePickerController,
  8. Color bigTickColor = Colors.green,
  9. bool isAxisVertical = false,
  10. Widget? marker,
  11. bool shouldTextBeAlignedHorizontallyOnVerticalScroll = false,
  12. Duration animationDuration = const Duration(milliseconds: 500),
  13. TextStyle? textStyle = const TextStyle(fontSize: 14.0),
  14. TextStyle? styleOfScrollValueMatched = const TextStyle(fontSize: 22.0, color: Colors.orangeAccent),
  15. double initialValue = 0,
  16. Color markerColor = Colors.yellow,
})

Implementation

ScalePicker(
    {required this.onValueChange,
    required this.width,
    required this.height,
    this.isInvertedScale = false,
    this.backgroundColor = Colors.white,
    this.smallTickColor = Colors.black,
    required this.scalePickerController,
    this.bigTickColor = Colors.green,
    this.isAxisVertical = false,
    this.marker,
    this.shouldTextBeAlignedHorizontallyOnVerticalScroll = false,
    this.animationDuration = const Duration(milliseconds: 500),
    this.textStyle = const TextStyle(fontSize: 14.0),
    this.styleOfScrollValueMatched =
        const TextStyle(fontSize: 22.0, color: Colors.orangeAccent),
    this.initialValue = 0,
    this.markerColor = Colors.yellow})
    : assert(isAxisVertical ? width >= 80 : height >= 80);