checkLoginStatus static method

Future<bool> checkLoginStatus(
  1. bool isLocal,
  2. String backendCanisterId
)

Implementation

static Future<bool> checkLoginStatus(
    bool isLocal, String backendCanisterId) async {
  List<Object> validatedDelegation =
      await getDelegations(isLocal, backendCanisterId);
  if (validatedDelegation.whereType<bool>().first) {
    _principalId = validatedDelegation[1].toString();
    return true;
  } else {
    return false;
  }
}