currentAttachmentPickerTypes property

Set<AttachmentPickerType> currentAttachmentPickerTypes

Returns the list of available attachment picker options.

Implementation

Set<AttachmentPickerType> get currentAttachmentPickerTypes {
  final containsImage = value.any((it) => it.type == AttachmentType.image);
  final containsVideo = value.any((it) => it.type == AttachmentType.video);
  final containsAudio = value.any((it) => it.type == AttachmentType.audio);
  final containsFile = value.any((it) => it.type == AttachmentType.file);

  return {
    if (containsImage) AttachmentPickerType.images,
    if (containsVideo) AttachmentPickerType.videos,
    if (containsAudio) AttachmentPickerType.audios,
    if (containsFile) AttachmentPickerType.files,
  };
}