1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Extend the possibilities of file picker

This commit is contained in:
2021-03-12 18:54:15 +01:00
parent 701d5d3c27
commit 19d4e1d31c
6 changed files with 199 additions and 39 deletions

View File

@ -45,3 +45,6 @@ Future<PickedFile> pickImage(BuildContext context) async {
? ImageSource.camera
: ImageSource.gallery);
}
/// Check if a mime type maps to an image or not
bool isImage(String mimeType) => mimeType.startsWith("image/");