final class ErrorDto { int error; String message; ErrorDto(this.error, this.message); ErrorDto.fromJson(Map json) : error = json['error'] as int, message = json['message']; } abstract interface class DtoMapAble { Map toMap(); }