isLoginBefore method

Future<bool> isLoginBefore()

Checks whether the user has logged in before and did not log out.

If you need to check whether the SDK is connected to the server, please use isConnected.

Return Whether the user has logged in before. true: The user has logged in before, false: The user has not logged in before or has called the logout method.


Future<bool> isLoginBefore() async {
  Map result =
      await ClientChannel.invokeMethod(ChatMethodKeys.isLoggedInBefore);
  try {
    return result.boolValue(ChatMethodKeys.isLoggedInBefore);
  } on ChatError catch (e) {
    throw e;