class BaseData { BaseData(); int code; dynamic data; dynamic extra; bool isError; bool isSuccess; String msg; String path; String timestamp; factory BaseData.fromJson(Map json) => BaseData() ..code = json['code'] as int ..data = json['data'] ..extra = json['extra'] ..isError = json['isError'] as bool ..isSuccess = json['isSuccess'] as bool ..msg = json['msg'] as String ..path = json['path'] as String ..timestamp = json['timestamp'] as String; Map toJson() => { 'code': this.code, 'data': this.data, 'extra': this.extra, 'isError': this.isError, 'isSuccess': this.isSuccess, 'msg': this.msg, 'path': this.path, 'timestamp': this.timestamp, }; }