Attachment constructor

Attachment({
  1. String? contentType,
  2. String? language,
  3. String? data,
  4. String? url,
  5. String? size,
  6. String? hash,
  7. String? title,
  8. String? creation,
})

Creates an instance of Attachment.

Implementation

Attachment({
  String? contentType,
  String? language,
  String? data,
  String? url,
  String? size,
  String? hash,
  String? title,
  String? creation,
}) : this.fromJson(
        JsonObject({
          if (contentType != null)
            contentTypeField.name: JsonString(contentType),
          if (language != null) languageField.name: JsonString(language),
          if (data != null) dataField.name: JsonString(data),
          if (url != null) urlField.name: JsonString(url),
          if (size != null) sizeField.name: JsonString(size),
          if (hash != null) hashField.name: JsonString(hash),
          if (title != null) titleField.name: JsonString(title),
          if (creation != null) creationField.name: JsonString(creation),
        }),
      );