filterEnabledTypes method
Set<AttachmentPickerType>
filterEnabledTypes({
- required Iterable<
AttachmentPickerOption> options,
Returns the list of enabled picker types.
Implementation
Set<AttachmentPickerType> filterEnabledTypes({
required Iterable<AttachmentPickerOption> options,
}) {
final availableTypes = currentAttachmentPickerTypes;
final enabledTypes = <AttachmentPickerType>{};
for (final option in options) {
final supportedTypes = option.supportedTypes;
if (availableTypes.any(supportedTypes.contains)) {
enabledTypes.addAll(supportedTypes);
}
}
return enabledTypes;
}