errorFromResponseBody method

String errorFromResponseBody(
  1. String body
)

Implementation

String errorFromResponseBody(String body) {
  Map<String, dynamic>? res = json.decode(body);
  if (res != null && res["error"] != null) {
    return res["error"];
  }
  return "none";
}