updateEntryByIndex method

  1. @override
bool updateEntryByIndex (
  1. int index,
  2. T e
)
override

Implementation

@override
bool updateEntryByIndex(int index, T e) {
  if (index < 0 || index > getEntryCount() - 1) {
    return false;
  }

  if (getEntryCount() == 0) {
    return false;
  }

  List<T> valueDatas = values;
  var pre = valueDatas.removeAt(index);
  e.x = pre.x;
  valueDatas.insert(index, e);

  calcMinMax();

  return true;
}