getFileType function

FileType getFileType(
  1. String? path
)

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;
}