byId method

X? byId(
  1. int id
)

Implementation

X? byId(int id) => (getWhere((element) => element.id == id) as X);