ApiException constructor

ApiException(
  1. int code,
  2. String? message
)

Implementation

ApiException(this.code, String? message) {
  if (message != null) {
    try {
      var decoded = json.decode(message);
      this.message = decoded['message'];
    } catch (e) {
      this.message = message;
    }
  }
}