Widget buildPreview(FileData file) { var previewAdaptor = previewDataAdaptors[file.mimeType] ?? const ImagePreviewAdapter(); return previewAdaptor.preview(context, file); }