buildSubToolStroke method

Widget buildSubToolStroke()

Implementation

Widget buildSubToolStroke() {
  var themeData = FastTheme.of(context);

  return SliderTheme(
    data: SliderThemeData(
      activeTrackColor: themeData.mainColor,
      inactiveTrackColor: themeData.dividerColor,
      thumbColor: themeData.mainColor,
      trackHeight: FastGap.gap_1,
      thumbShape: RoundSliderThumbShape(
        enabledThumbRadius: FastGap.gap_1_5,
        elevation: 2,
      ),
      overlayShape: RoundSliderOverlayShape(overlayRadius: FastGap.gap_3),
    ),
    child: Slider(
      value: _strokeWidth?.toDouble() ?? 4.0,
      onChanged: (value) {
        _strokeWidth = value;
        setState(() {});
      },
      onChangeEnd: (value) => widget.controller.setStrokeWidth(value),
      min: 1,
      max: 24,
    ),
  );
}