OathTokenCode.fromJson constructor
Deserializes the specified JSON into an OathTokenCode object.
Implementation
factory OathTokenCode.fromJson(Map<String, dynamic>? json) {
String type = json?['oathType'];
var oathType =
type.toUpperCase() == 'HOTP' ? TokenType.HOTP : TokenType.TOTP;
return OathTokenCode(
json?['code'], json?['start'], json?['until'], oathType);
}