getCurrentAccountInfo method
Returns information about the current account, or null
if there is none.
Returns a SealdAccountInfo containing the Seald ID of the local Seald user, the device ID, and the date at which the current device keys will expire. null
if there is no local user.
Implementation
SealdAccountInfo? getCurrentAccountInfo() {
if (_closed) {
throw SealdException(
code: "INSTANCE_CLOSED",
id: "FLUTTER_INSTANCE_CLOSED",
description: "Instance already closed.");
}
final Pointer<NativeSealdAccountInfo> result =
_bindings.SealdSdk_GetCurrentAccountInfo(_ptr.pointer());
if (result.address == nullptr.address) {
return null;
} else {
final accountInfo = SealdAccountInfo._fromC(result);
return accountInfo;
}
}