calculateValue method

dynamic calculateValue()

calculate values

Implementation

calculateValue() {
  if (datas == null) return;
  if (datas!.isEmpty) return;
  maxScrollX = getMinTranslateX().abs();
  setTranslateXFromScrollX(scrollX);
  mStartIndex = indexOfTranslateX(xToTranslateX(0));
  mStopIndex = indexOfTranslateX(xToTranslateX(mWidth));
  for (int i = mStartIndex; i <= mStopIndex; i++) {
    var item = datas![i];
    getMainMaxMinValue(item, i);
    getVolMaxMinValue(item);
    for (int idx = 0; idx < mSecondaryRectList.length; ++idx) {
      getSecondaryMaxMinValue(idx, item);
    }
  }
}