fromId method

T fromId(
  1. String id
)

Return the element with specified id.

Implementation

T fromId(String id) {
  return firstWhere((element) => (element as ItemSerializable).id == id);
}