update method

void update(
  1. String id
)

Update from id

Implementation

void update(String id) {
  bool contains = items.indexWhere((element) => element.value == id) != -1;
  if (contains) {
    value = items.firstWhere((element) => element.value == id);
  }
}