getFormats method
Returns subset of allFormats
that this reader can provide,
sorted according to priority set by source application.
Implementation
@override
List<DataFormat> getFormats(List<DataFormat> allFormats) {
final res = <DataFormat>[];
for (final item in items) {
final itemFormats = item.getFormats(allFormats);
for (final format in itemFormats) {
if (!res.contains(format)) {
res.add(format);
}
}
}
return res;
}