fromJSON static method

PeekanappError fromJSON(
  1. Map<String, dynamic> json
)

Implementation

static PeekanappError fromJSON(Map<String, dynamic> json) {
  PeekanappError? error;

  for (var type in _values) {
    if (type.code == json['error']) {
      error = type;
      break;
    }
  }

  return error ?? UnknownError;
}