login method

User login(
  1. String? idNumber,
  2. String? password
)

Implementation

User login(String? idNumber, String? password) {
  var entities = super.getEntities.map((e) => e as User).toList();

  return entities.firstWhere((element) =>
      element.idNumber == idNumber && element.password == password);
}