fluttercandies / flutter_wechat_assets_picker

An image picker (also with video and audio) for Flutter projects based on the WeChat's UI.
https://pub.dev/packages/wechat_assets_picker
Apache License 2.0
1.5k stars 437 forks source link

[BUG] The returned assets should not be affected #427

Closed hellohejinyu closed 1 year ago

hellohejinyu commented 1 year ago

Describe the bug

At 8.4.1, when the selection is complete, add a dispose method to destroy. At this time, the selected resource array will be destroyed, but this operation will synchronously affect the external return value.

https://github.com/fluttercandies/flutter_wechat_assets_picker/commit/d0c22396edbbf5edcbd3547f12804d90be3a3dc4#r108379761

image

How to reproduce

You can see this simple example

Steps to reproduce the behavior:

  1. Pick Assets in Common picker;
  2. See output in console;

Expected behavior

The length should same between before and after;

Version information

AlexV525 commented 1 year ago

Thanks for providing the detail!