login method
An app user logs in to the chat server with a password or token.
Param username The username.
Param pwdOrToken The password or token.
Param isPassword Whether to log in with password or token.
true: (default) Log in with password.
false: Log in with token.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<void> login(String username, String pwdOrToken,
[bool isPassword = true]) async {
await EMClient.getInstance.login(username, pwdOrToken, isPassword);
}