isVideo static method

bool isVideo(
  1. String filePath
)

Checks if string is an video file.

Implementation

static bool isVideo(String filePath) {
  var ext = filePath.toLowerCase();

  return ext.endsWith(".mp4") ||
      ext.endsWith(".wmv") ||
      ext.endsWith(".mpg") ||
      ext.endsWith(".3gp") ||
      ext.endsWith(".m4v") ||
      ext.endsWith(".mgv") ||
      ext.endsWith(".mov") ||
      ext.endsWith(".mkv") ||
      ext.endsWith(".ogv") ||
      ext.endsWith(".qtm") ||
      ext.endsWith(".srt") ||
      ext.endsWith(".amc") ||
      ext.endsWith(".dvx") ||
      ext.endsWith(".flv") ||
      ext.endsWith(".evo") ||
      ext.endsWith(".avi") ||
      ext.endsWith("rmvb") ||
      ext.endsWith(".mpg") ||
      ext.endsWith("mpeg");
}