How to use Isolates in #Flutter

preview_player
Показать описание


#Flutter

Speaker: Eric Windmill
Products Mentioned: Flutter
Рекомендации по теме
Комментарии
Автор

Just read about some changes for the Flutter team. Your hard work has improved the lives of so many people in this community. Thank you so much to all who are affected in these changes. I hope that the transitions coming up go smoothly and find you awesome people in awesome new places.

communityband
Автор

This just saved me. Thank you very much for everything

septilevg
Автор

This is the second time I watched flutter isolate, I really love it, but I wish there are more common use case for this, the app I'm building, only thing I can think of to use isolate is process videos😢

happycat
Автор

so basically the same as android app dev "don't commute on the main UI thread"

peachezprogramming
Автор

Isolates makes multi-core apps using Flutter really awesome. I'm curious: in addition to avoiding jank, does offloading that work onto a background core also improve battery life? It seems like using multiple cores _should_ have a net better energy draw than the same work being task-switched on a single core. If nothing else, doing more work in a shorter amount of time would at least save on screen-time, but ignoring that, is it more power efficient for just the CPU draw?

willcoder
Автор

What is the difference between this and async/await? This looks much simpler to implement.

daze
Автор

A simple "await" will unblock the UI but will create other corner use cases that you must take care of.

Don't forget to disable the button used to launch any heavy computation, then re-enable it only when the computation is done or failed

Be also very careful to manage all halt events like another application "stealing" the focus (standby, phone call, open from shortcut/notification...).by keeping the UI state in sync with application state on comeback.

sitedel
Автор

what about it not running on web? can we have something for web has well???

prince-sonawane
Автор

So isolates are only useful if data is heavy?

himanshuu
Автор

Woah it's that easy? 😂 I always thought it'd be more complicated than that like establishing your own Receive and send ports and that..

so I always use compute which is jarring to use, top level functions and all that, and having to force arguments on functions that don't require any params

maran.ath
Автор

cannot draw the dart ui image in canvas using it

Anjanyarsa
Автор

Yeaaahh... Do it on web. I dare you, do it on flutter web

Thioby