import 'dart:ffi'; import 'package:json_annotation/json_annotation.dart'; part 'image_resp.g.dart'; @JsonSerializable() class ImageResp { int id; String file_name; String file_path; int upload_time; int size; int width; int height; ImageResp(this.id, this.file_name, this.file_path, this.upload_time, this.size, this.width, this.height); /// A necessary factory constructor for creating a new Configs instance /// from a map. Pass the map to the generated `_$ConfigsFromJson()` constructor. /// The constructor is named after the source class, in this case, Configs. factory ImageResp.fromJson(Map json) => _$ImageRespFromJson(json); /// `toJson` is the convention for a class to declare support for serialization /// to JSON. The implementation simply calls the private, generated /// helper method `_$ImageRespToJson`. Map toJson() => _$ImageRespToJson(this); }