toAttachmentType method

String toAttachmentType()

Converts the FileType to a String.

Implementation

String toAttachmentType() {
  switch (this) {
    case FileType.image:
      return 'image';
    case FileType.video:
      return 'video';
    case FileType.audio:
      return 'audio';
    case FileType.any:
    case FileType.media:
    case FileType.custom:
      return 'file';
  }
}