If I do this, for example:
FutureBuilder(
initialData: null,
future: compute(expensiveParsingOperation, data),
builder: (context, snapshot) {
if(!snapshot.hasData){
// This doesn't spin (frozen). The entire UI is janked until the expensive operation future completes.
CircularProgressIndicator();
}else {
Container();
}
});
I expected the above to send expensiveParsingOperation
function to a web worker or something and not jank the main thread, but this is not what is occurring in my observation.
compute
does nothing on the web platform at this time
see https://github.com/flutter/flutter/issues/33577
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With