I'm using Dart Http in a Flutter app to download large files from a server.
Sometimes the user may want to cancel the request (so that the download is stopped)
The problem is that there is no way to cancel a Future in dart. Even when converted to a Stream which can be cancelled, the download will still continue running in the background.
I'm using Dart Http in a Flutter app to download large files from a server.
Sometimes the user may want to cancel the request (so that the download is stopped)
The problem is that there is no way to cancel a
Futurein dart. Even when converted to aStreamwhich can be cancelled, the download will still continue running in the background.