lisen87 / image_pickers

图片多选并压缩,保存图片到相册,视频多选,预览图片和视频
Apache License 2.0
90 stars 59 forks source link

videoSelectMaxSecond parameter won't be overridden when using GalleryMode.all #122

Closed ppbrasil closed 11 months ago

ppbrasil commented 1 year ago

If I set my method to use GalleryMode.video as

class ImagePickersMediaService implements MediaService {
  @override
  Future<List<dynamic>> getObjectsListFromDevice() async {
    List<imagePickers.Media> listVideoPaths =
        await imagePickers.ImagePickers.pickerPaths(
      galleryMode: imagePickers.GalleryMode.video,
      videoSelectMaxSecond: 1200,
      selectCount: 10,
    );

    return listVideoPaths;
  }

the 1200 parameter is respected. But, if I set it to GalleryMode.all as

  class ImagePickersMediaService implements MediaService {
  @override
  Future<List<dynamic>> getObjectsListFromDevice() async {
    List<imagePickers.Media> listVideoPaths =
        await imagePickers.ImagePickers.pickerPaths(
      galleryMode: imagePickers.GalleryMode.all,
      videoSelectMaxSecond: 1200,
      selectCount: 10,
    );

    return listVideoPaths;
  }

It defaults back to 120

lisen87 commented 1 year ago

The issue has been dealt with and a new version has been released. image_pickers 2.0.4+4