fromJsonString static method
Converts a jsonString
to a Oauth2ResponseTypes
Throws a RangeError if the jsonString
is not supported
Implementation
static Oauth2ResponseTypes fromJsonString({
required String jsonString,
}) {
switch (jsonString) {
case "code":
return Oauth2ResponseTypes.code;
default:
throw RangeError(
"There's no subject type corresponding to $jsonString.");
}
}