FlutterWay / gallery_picker

MIT License
6 stars 5 forks source link

File Null When Picking Video #2

Open ahmdmau opened 7 months ago

ahmdmau commented 7 months ago

Hi!

Im getting issue when picking video using gallery_picker. When picking image, there is no issue. But when im picking video, then get the file, there an issue: null pointer operator. Here is my code:

`List? media = await GalleryPicker.pickMedia( context: context, config: Config(mode: Mode.light), );

if (media != null) { List medias = await Future.wait(media.map((element) async { final file = await element.getFile(); return PostMedia( mediaType: element.type, file: file, fileName: file.name); })); if (!mounted) return; context.read().add(OnAddMedia(medias)); } `

Please let me know how to fix this! Thanks in advance!

worldwidee commented 4 months ago

@ahmdmau Hi, Can you try the latest version? If the problem still continue, I'll ask for more details about your issue, because I'm not having any problems selecting videos right now. Added automated localization for recent tabs in the latest update