I'm using file picker for my application. In that, I want to know picked file mime type even file name has no extension. How it is possible?
use this package mime
You can get mime type from file path like this:
import 'package:mime/mime.dart';
....
lookupMimeType(file.path) // output: Image/Jpeg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With