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 OpacitySlider extends StatelessWidget {
  final StyleEditable ctrl;
  const OpacitySlider({required this.ctrl});

  @override
  Widget build(BuildContext context) => Obx(() => LabeledSlider(
        label: 'Átlátszóság',
        value: ctrl.activeEditOpacity.value,
        min: 0.1,
        max: 1.0,
        display: '${(ctrl.activeEditOpacity.value * 100).round()}%',
        color: ctrl.activeEditColor.value,
        onChanged: (v) => ctrl.activeEditOpacity.value = v,
      ));
}
