class AssetTransferAttachment { AssetTransferAttachment({ this.id, this.attachmentName, }); AssetTransferAttachment.fromJson(dynamic json) { id = json['id']; attachmentName = json['attachmentName']; } num? id; // Now nullable String? attachmentName; // Now nullable AssetTransferAttachment copyWith({ num? id, // Parameter is now nullable String? attachmentName, // Parameter is now nullable }) => AssetTransferAttachment( id: id ?? this.id, attachmentName: attachmentName ?? this.attachmentName, ); Map toJson() { final map = {}; map['id'] = id; map['attachmentName'] = attachmentName; return map; } }