mirror of
https://github.com/Iconica-Development/flutter_media_picker.git
synced 2025-05-18 16:33:45 +02:00
feat: add quality as parameter to the pickFile call with default value of 20
This commit is contained in:
parent
41030cfa13
commit
1e579005f2
1 changed files with 3 additions and 2 deletions
|
@ -17,8 +17,9 @@ class MediaPickerFileService implements MediaPickerService {
|
|||
late VideoPlayerController controller;
|
||||
|
||||
@override
|
||||
Future<MediaResult?> pickImageFile() async {
|
||||
var image = await ImagePicker().pickImage(source: ImageSource.camera);
|
||||
Future<MediaResult?> pickImageFile({int quality = 20}) async {
|
||||
var image = await ImagePicker()
|
||||
.pickImage(source: ImageSource.camera, imageQuality: quality);
|
||||
|
||||
if (image != null) {
|
||||
return MediaResult(
|
||||
|
|
Loading…
Reference in a new issue