import 'package:json_annotation/json_annotation.dart'; part 'base_data.g.dart'; @JsonSerializable() class BaseData { BaseData(); int code; dynamic data; BaseDataExtra extra; bool isError; bool isSuccess; String msg; String path; String timestamp; factory BaseData.fromJson(Map json) => _$BaseDataFromJson(json); Map toJson() => _$BaseDataToJson(this); } class BaseDataExtra { BaseDataExtra(); factory BaseDataExtra.fromJson(Map json) => BaseDataExtra(); Map toJson() => {}; }