isVideo method

bool isVideo(
  1. String filePath
)

Kiểm tra string là video file

Implementation

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

  return ext.endsWith(".mp4") ||
      ext.endsWith(".avi") ||
      ext.endsWith(".wmv") ||
      ext.endsWith(".rmvb") ||
      ext.endsWith(".mpg") ||
      ext.endsWith(".mpeg") ||
      ext.endsWith(".3gp");
}