getUpdateKey method

NsgUpdateKey getUpdateKey(
  1. String id,
  2. NsgUpdateKeyType type
)

Implementation

NsgUpdateKey getUpdateKey(String id, NsgUpdateKeyType type) {
  var key = updateKeys.firstWhereOrNull((element) => element.id == id);
  if (key != null) return key;
  key = NsgUpdateKey(id: id, type: type);
  updateKeys.add(key);
  return key;
}