AuthyoResponseModel.withError constructor
AuthyoResponseModel.withError(
- Map<
String, dynamic> json, { - AuthyoResponseModel? from,
Creates a response model from an error response. from carries the
server reply's attempt / retry counters over to the error model.
Implementation
AuthyoResponseModel.withError(
Map<String, dynamic> json, {
AuthyoResponseModel? from,
}) {
success = false;
error = json['error'].toString();
errorCode = json['errorCode'].toString();
message = from?.message;
attemptsRemaining = from?.attemptsRemaining;
maxVerifyAttempts = from?.maxVerifyAttempts;
retryAfterSeconds = from?.retryAfterSeconds;
}