isImage static method

bool isImage(
  1. String fileName, [
  2. List<String>? ext
])

判断文件是否是图片

Implementation

static bool isImage(String fileName, [List<String>? ext]) =>
    (ext ?? ['jpg', 'jpeg', 'png', 'gif', 'bmp']).contains(
      getFileSuffix(fileName),
    );