class BaseResponse { bool? success; int? code; List? errors; dynamic data; BaseResponse({this.success, this.code, this.errors, this.data}); BaseResponse.fromJson(Map json) { success = json['success']; code = json['code']; if (json.containsKey('errors')) { errors = List.from( json["errors"].map((x) => BaseErrors.fromJson(x)), ); } if (json.containsKey('data')) { data = json['data']; } } } class BaseErrors { int? code; String? description; BaseErrors({this.code, this.description}); BaseErrors.fromJson(Map json) { code = json['code']; description = json['description']; } }