import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:terepi_seged/core/style_editable.dart';
import 'package:terepi_seged/pages/map_survey/presentations/controllers/map_survey_controller.dart';

import 'labeled_slider.dart';

class StrokeSlider extends StatelessWidget {
  final StyleEditable ctrl;
  const StrokeSlider({required this.ctrl});

  @override
  Widget build(BuildContext context) => Obx(() => LabeledSlider(
        label: 'Körvonal',
        value: ctrl.activeEditStrokeWidth.value,
        min: 0.5,
        max: 10.0,
        divisions: 19,
        display: '${ctrl.activeEditStrokeWidth.value.toStringAsFixed(1)} px',
        color: ctrl.activeEditColor.value,
        onChanged: (v) => ctrl.activeEditStrokeWidth.value = v,
      ));
}
