I’m writing a flutter plugin to download files. My API is simple, the download function returns a stream of Uint8List
. User can download multiple files simultaneously:
Future<Stream<Uint8List>> downloadFile(String url);
I’d like to create a separate event channels for each download call, because each channel has its own lifecycle. But all the tutorials online are talking about creating some singleton-like event channels during plugin initialization, not inside an API call.