incrediblezayed / file_saver

A simple flutter plugin for saving files in all platforms
https://pub.dev/packages/file_saver
BSD 3-Clause "New" or "Revised" License
75 stars 101 forks source link

fix: added Method Channel result response to null #79

Closed Javidroid closed 11 months ago

Javidroid commented 1 year ago

Apart from code format changes, the most important change is adding result?.success(null) to the else block of onActivityResult(...) method on Dialog.kt

This causes the MethodChannel result to return something that can be 'heard' from the outside. In this case: null.

It is specifically a 'success' instead of an 'error' as, technically, the operation was made correctly, but the user chose to cancel it, returning nothing instead.