widget method

Widget widget(
  1. BuildContext context
)
override

Implementation

widget(context) => SliderTheme(
      data: SliderThemeData(
        trackHeight: trackHeight,
        activeTrackColor: activeTrackColor,
        inactiveTrackColor: inactiveTrackColor,
        disabledActiveTrackColor: disabledActiveTrackColor,
        disabledInactiveTrackColor: disabledInactiveTrackColor,
        activeTickMarkColor: activeTickMarkColor,
        inactiveTickMarkColor: inactiveTickMarkColor,
        disabledActiveTickMarkColor: disabledActiveTickMarkColor,
        disabledInactiveTickMarkColor: disabledInactiveTickMarkColor,
        overlappingShapeStrokeColor: overlappingShapeStrokeColor,
        disabledThumbColor: disabledThumbColor,
        overlayColor: overlayColor,
        valueIndicatorColor: valueIndicatorColor,
        overlayShape: overlayShape,
        tickMarkShape: tickMarkShape,
        thumbShape: thumbShape,
        trackShape: trackShape,
        valueIndicatorShape: valueIndicatorShape,
        rangeTickMarkShape: rangeTickMarkShape,
        rangeThumbShape: rangeThumbShape,
        rangeTrackShape: rangeTrackShape,
        rangeValueIndicatorShape: rangeValueIndicatorShape,
        showValueIndicator: showValueIndicator,
        valueIndicatorTextStyle: valueIndicatorTextStyle?.value,
        minThumbSeparation: minThumbSeparation,
        thumbSelector: thumbSelector,
      ),
      child: sliderType == NikuSliderType.adaptive
          ? Slider.adaptive(
              value: data,
              onChanged: onChanged,
              onChangeStart: onChangeStart,
              onChangeEnd: onChangeEnd,
              min: min ?? 0,
              max: max ?? 1,
              divisions: divisions,
              label: label,
              activeColor: activeColor,
              inactiveColor: inactiveColor,
              thumbColor: thumbColor,
              mouseCursor: mouseCursor,
              semanticFormatterCallback: semanticFormatterCallback,
              focusNode: focusNode,
              autofocus: autofocus ?? false,
            )
          : sliderType == NikuSliderType.cupertino
              ? SizedBox(
                  // Copy from RangeSlider _buildCupertinoSlider
                  width: double.infinity,
                  child: CupertinoSlider(
                    value: data,
                    onChanged: onChanged,
                    onChangeStart: onChangeStart,
                    onChangeEnd: onChangeEnd,
                    min: min ?? 0,
                    max: max ?? 1,
                    divisions: divisions,
                    activeColor: activeColor,
                    thumbColor: thumbColor ?? CupertinoColors.white,
                  ),
                )
              : Slider(
                  value: data,
                  onChanged: onChanged,
                  onChangeStart: onChangeStart,
                  onChangeEnd: onChangeEnd,
                  min: min ?? 0,
                  max: max ?? 1,
                  divisions: divisions,
                  label: label,
                  activeColor: activeColor,
                  inactiveColor: inactiveColor,
                  thumbColor: thumbColor,
                  mouseCursor: mouseCursor,
                  semanticFormatterCallback: semanticFormatterCallback,
                  focusNode: focusNode,
                  autofocus: autofocus ?? false,
                ),
    );