media_utils 1.1.1 media_utils: ^1.1.1 copied to clipboard
An easy helper class to flutter with many support formats. It supports local and web files.
MediaUtils #
An easy helper class to flutter with many support formats. Suport local and web files.
We often need to identify the format of a file to know if we will display a video player for video, an image for an image file, etc. This plugin does it easily and conveniently. if (MediaUtils.isVideo (your_path)) { // do anything } Supports local and web files, and image, video, word, pdf, apk, excel, and txt formats
example:
if (MediaUtils.isAudio(_path)) {
// ToDo anything
}
if (MediaUtils.isVideo(_path)) {
// ToDo anything
}
if (MediaUtils.isImage(_path)) {
// ToDo anything
}
if (MediaUtils.isVideo(_path)) {
// ToDo anything
}
if (MediaUtils.isApk(_path)) {
// ToDo anything
}
if (MediaUtils.isPDF(_path)) {
// ToDo anything
}
if (MediaUtils.isWord(_path)) {
// ToDo anything
}
if (MediaUtils.isTxt(_path)) {
// ToDo anything
}