I hava a scenio in udemy like app in which i have to post a large size video .But it will hang the UI .I think isolate is good for this scenario .As per my knowledge their is a high level isolate API( compute() ) finction .That will take care of spawn run and other things .We just have to give our finction .
Since isolates run on its own event loop, it is not recommended using it for basic api calls. As isolates are isolated, the subsequent code may not wait for response data. So it is sufficient to make use of Futures to do the same task concurrently rather than going for parallelism.
A crystal clear explanation which i needed 👏
I hava a scenio in udemy like app in which i have to post a large size video .But it will hang the UI .I think isolate is good for this scenario .As per my knowledge their is a high level isolate API( compute() ) finction .That will take care of spawn run and other things .We just have to give our finction .
Very nice tutorial to understand the concept of isolates.... if apps goes in to the background or in active if the task will continue its work ?
Yes, it will work.
Can we use it with http package to make requests and get big response?
Since isolates run on its own event loop, it is not recommended using it for basic api calls. As isolates are isolated, the subsequent code may not wait for response data. So it is sufficient to make use of Futures to do the same task concurrently rather than going for parallelism.
is it work even
we close the app?
Yes