responseIsError function
Checks whether the supplied response map has an "error" key. If this is the case, "true" is returned. If this is not the case, "false" is returned.
Implementation
bool responseIsError(Map<String,dynamic> subject){
bool result = false;
if (subject.containsKey("error")){
result = true;
}
else {}
return result;
}