isVideo property

bool get isVideo

Check if this is a video file

Implementation

bool get isVideo {
  final mime = contentType.toLowerCase();
  return mime.startsWith('video/') ||
      [
        '.mp4',
        '.webm',
        '.ogg',
        '.ogv',
        '.avi',
        '.mov',
        '.mkv',
      ].any((ext) => filename.toLowerCase().endsWith(ext));
}