flutter_background_fetch icon indicating copy to clipboard operation
flutter_background_fetch copied to clipboard

[BUG] Method finish should return a Future<void>, not void

Open tony-ditchlabs opened this issue 1 year ago • 0 comments

BackgroundFetch.finish(taskId); has a return type of void. But it directly calls _methodChannel.invokeMethod('finish', taskId);, which has a return type of Future<void>.

This makes it very difficult to catch any exceptions from that call (specifically, the MissingPluginException that is expected to be thrown in a testing environment).

tony-ditchlabs avatar Nov 13 '23 15:11 tony-ditchlabs