getErrorMessage function
Implementation
String getErrorMessage(dynamic error) {
String? message;
if (error is JsObject) {
message = error["message"]?.toString() ?? error.toString();
}
return message ?? error.toString();
}
String getErrorMessage(dynamic error) {
String? message;
if (error is JsObject) {
message = error["message"]?.toString() ?? error.toString();
}
return message ?? error.toString();
}