AuthenticateRequestType.fromJsonString constructor
AuthenticateRequestType.fromJsonString(
- String jsonString, {
- MediationType mediation = MediationType.Optional,
- bool preferImmediatelyAvailableCredentials = true,
Constructs a new instance from a JSON string.
Implementation
factory AuthenticateRequestType.fromJsonString(
String jsonString, {
MediationType mediation = MediationType.Optional,
bool preferImmediatelyAvailableCredentials = true,
}) {
final decoded = jsonDecode(jsonString);
if (decoded is! Map<String, dynamic>) {
throw FormatException('Expected JSON object, got ${decoded.runtimeType}');
}
return AuthenticateRequestType.fromJson(
decoded,
mediation: mediation,
preferImmediatelyAvailableCredentials:
preferImmediatelyAvailableCredentials,
);
}