isVideo static method

bool isVideo(
  1. String filePath
)

Checks if string is an video file.

Implementation

static bool isVideo(String filePath) {
  final 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');
}