isLoginBefore method Null safety
Checks whether the user has logged in before and did not log out.
Reference: If you need to check whether the SDK is connected to the server, please use {@link #isConnected()}.
Return The result of whether the user has logged in before.
true: means that the user has logged in before,
false: means that the user has not login before or has called {@link #logout()} method.
Implementation
Future<bool> isLoginBefore() async {
Map result = await _channel.invokeMethod(ChatMethodKeys.isLoggedInBefore);
try {
ChatError.hasErrorFromResult(result);
return result.boolValue(ChatMethodKeys.isLoggedInBefore);
} on ChatError catch (e) {
throw e;
}
}