isFile property

bool get isFile

Indicates whether this Attachment represents a file.

Implementation

bool get isFile {
  if (this is FileAttachment) {
    return !(this as FileAttachment).isVideo;
  }

  if (this is LocalAttachment) {
    final local = this as LocalAttachment;
    return !local.file.isImage && !local.file.isVideo;
  }

  return false;
}