flutter_background_fetch
flutter_background_fetch copied to clipboard
[BUG] Method finish should return a Future<void>, not void
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).