modifyItem method

void modifyItem(
  1. int index,
  2. T modify(
    1. T value
    )
)

use to modify specific item in the list

Implementation

void modifyItem(int index, T modify(T value)) {
  if (value.length > index) {
    value[index] = modify(value[index]);
    notifyListeners();
  }
}