getFileType function
Implementation
FileType getFileType(String? path) {
FileType fileType = FileType.IMAGE;
String? suffix = ".jpg";
if (path?.isNotEmpty == true) {
if (path!.endsWith(suffix)) {
fileType = FileType.IMAGE;
} else {
fileType = FileType.VIDEO;
}
}
return fileType;
}