login method

bool login(
  1. String username,
  2. String password
)

Implementation

bool login(String username, String password) {
  for (var user in _users) {
    if (user.username == username && user.password == password) {
      return true;
    }
  }
  return false;
}