TF-644 Update new icon for attachment
This commit is contained in:
@@ -9,5 +9,15 @@ extension MediaTypeExtension on MediaType {
|
||||
|
||||
bool isImageFile() => SupportedPreviewFileTypes.imageMimeTypes.contains(mimeType);
|
||||
|
||||
bool isDocFile() => SupportedPreviewFileTypes.docMimeTypes.contains(mimeType);
|
||||
|
||||
bool isPowerPointFile() => SupportedPreviewFileTypes.pptMimeTypes.contains(mimeType);
|
||||
|
||||
bool isExcelFile() => SupportedPreviewFileTypes.xlsMimeTypes.contains(mimeType);
|
||||
|
||||
bool isZipFile() => SupportedPreviewFileTypes.zipMimeTypes.contains(mimeType);
|
||||
|
||||
bool isPdfFile() => SupportedPreviewFileTypes.pdfMimeTypes.contains(mimeType);
|
||||
|
||||
DocumentUti getDocumentUti() => DocumentUti(SupportedPreviewFileTypes.iOSSupportedTypes[mimeType]);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,41 @@ class SupportedPreviewFileTypes {
|
||||
'image/gif',
|
||||
'image/png',];
|
||||
|
||||
static const docMimeTypes = [
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'application/vnd.oasis.opendocument.text',
|
||||
'application/vnd.oasis.opendocument.text-template',
|
||||
'application/vnd.oasis.opendocument.text-web',
|
||||
'application/vnd.oasis.opendocument.text-master',
|
||||
'application/msword',
|
||||
'application/vnd.ms-works'];
|
||||
|
||||
static const pdfMimeTypes = [
|
||||
'application/pdf',
|
||||
'application/rtf'];
|
||||
|
||||
static const xlsMimeTypes = [
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'application/vnd.oasis.opendocument.spreadsheet',
|
||||
'application/vnd.oasis.opendocument.spreadsheet-template',
|
||||
'application/vnd.oasis.opendocument.chart',
|
||||
'application/vnd.oasis.opendocument.formula',
|
||||
'application/vnd.ms-excel'];
|
||||
|
||||
static const pptMimeTypes = [
|
||||
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||
'application/vnd.oasis.opendocument.presentation',
|
||||
'application/vnd.oasis.opendocument.presentation-template',
|
||||
'application/vnd.ms-powerpoint'];
|
||||
|
||||
static const zipMimeTypes = [
|
||||
'application/x-tar',
|
||||
'application/x-gtar',
|
||||
'application/x-gzip',
|
||||
'application/x-compressed',
|
||||
'application/x-zip-compressed',
|
||||
'application/java-archive'];
|
||||
|
||||
static const iOSSupportedTypes = {
|
||||
'text/plain' : 'public.plain-text',
|
||||
'text/html' : 'public.html',
|
||||
|
||||
@@ -118,6 +118,13 @@ class ImagePaths {
|
||||
String get icSelectedSB => _getImagePath('ic_selected_sb.svg');
|
||||
String get icUserSB => _getImagePath('ic_user_sb.svg');
|
||||
String get icComposeWeb => _getImagePath('ic_compose_web.svg');
|
||||
String get icFileDocx => _getImagePath('ic_file_docx.svg');
|
||||
String get icFileZip => _getImagePath('ic_file_zip.svg');
|
||||
String get icFileXlsx => _getImagePath('ic_file_xlsx.svg');
|
||||
String get icFilePng => _getImagePath('ic_file_png.svg');
|
||||
String get icFilePdf => _getImagePath('ic_file_pdf.svg');
|
||||
String get icFilePptx => _getImagePath('ic_file_pptx.svg');
|
||||
String get icFileEPup => _getImagePath('ic_file_epup.svg');
|
||||
|
||||
String _getImagePath(String imageName) {
|
||||
return AssetsPaths.images + imageName;
|
||||
|
||||
Reference in New Issue
Block a user