login method Null safety

void login(
  1. String user,
  2. String password
)

Login

Allows log in credentials to be changed if needed.

Implementation

void login(String user, String password) {
  if (user.isNotEmpty) {
    _database.login(user, password);
  } else {
    throw SporranException(SporranException.invalidLoginCredsEx);
  }
}