findAllComplaintsByUserId method

List<Complaint> findAllComplaintsByUserId(
  1. int userId
)

Implementation

List<Complaint> findAllComplaintsByUserId(int userId) {
  var entities = super.getEntities.map((e) => e as Complaint).toList();
  return entities.where((element) => element.userId == userId).toList();
}