persenlee / native_share

flutter share
MIT License
5 stars 4 forks source link

Not getting return result from share call #3

Closed Paul-Todd closed 4 years ago

Paul-Todd commented 4 years ago

Hi,

It seems that in the handleMethodCall in the iOS/ObjC code the result is never set so the async never completes and so any calls depending on this do not work.

  shareFile() async {
    File file = await screenshotController.capture();
    print('startng activity');
    await NativeShare.share({'title': 'Results', 'image': file.path});
    print('Deleting file ${file.path}');
    await file.delete();
  }

This just prints "startng activity" in the console and nothing else

Is this a bug?

Paul-Todd commented 4 years ago

After a bit of investigation it appears the completionWithItemsHandler is not being set - see this imolementation for an example and a detailed explaination here