Implementation
Future<String?> createCredential(String address) async {
try {
final options = MakeCredentialOptions.fromJson(jsonDecode(makeCredentialJson));
options.userEntity = UserEntity(
id: Uint8List.fromList(address.codeUnits),
displayName: address,
name: address,
);
final attestation = await _auth.makeCredential(options);
_credentials.add(CredentialData(address, attestation));
return attestation.getCredentialIdBase64();
} on AuthenticatorException catch (e) {
if (kDebugMode) {
print(e);
}
return null;
}
}