circleTapLogic method

dynamic circleTapLogic(
  1. double value
)

circle expansion logic when tapping

Implementation

circleTapLogic(double value) {
  for (var i = 0; i < (_data.startValue?.length ?? 0); i++) {
    /// Determine the value of the start point and end point and the value of the tap point for each element.
    if ((_data.startValue?[i] ?? 0) < value &&
        (_data.startValue?[i] ?? 0) + (_data.endValue?[i] ?? 0) > value) {
      if (_data.circleTapIndex == i) {
        _data.circleTapValue =
            _data.circleTapValue == 1.0 ? _data.circleDefaultTapValue : 1.0;
      } else {
        _data.circleTapValue = _data.circleDefaultTapValue;
      }
      _data.circleTapIndex = i;
      _data.circleController.circleIndex.sink
          .add([_data.circleTextList?[i] ?? "", i]);
    }
  }
}