this series will be lit 🔥
Really useful video, can't wait for the next "Technique of the week"!
dart is so simple its funny sometimes. thank you for not making us deal with annoying things to do this.
what a great presentation series!!
This is super important when you're dealing with AI and images!
Used this type of function for object detection of foods in a diet app I made. App wasn't great, but learning about this was very useful!
Very interesting. I didn't know about isolates. Will be researching them a bit more now. Thanks for this!
thank you Flutter Team!
Interesting series, I hope we see more of it!
This is what I needed 👍, thank you Flutter 🥳
This is freaking awesome and life changing
I’m like like this segment. I can already tell.
from what i remember isolates where implemented different than what they describe in the video, this seams legit easy!!
Excellent!
Concise and clear 👌
it was about time!!!!
I love this video, thank u
finally Isolates!
Thank you 🎉
flutter is growing so fast
Thanks!
so great!!! 😀
good job flutter team
Proud to be Flutter Developer
플러터를 죽이지마세요 최고의 앱제작 프레임워크입니다
You can use it with background elements, such as apps that allow users to listen to sound in the background while continuing to use the app.
Yeah I was just thinking, I have an app using geofencing and this would be a good candidate to use while it listens to the realtime geofence reporting
Flutter all the way!!!! 💗
amazing
Perfection
Waiting is end now 🤩
Technique of the week:
It will be really useful after Widget of the week. ❤
Fire 🔥
AWESOME
Yo that's actually huge. more, I need more!
Can you use isoltes for Web?
As much as I love the idea of this. I feel like this should have been implemented into flutter itself behind the scenes.
As soon as I try to implement Isolates, with either this code or with flutter_isolate, I run into one problem after the next, such as:
Unhandled Exception: Invalid argument(s): Illegal argument in isolate message: object is unsendable - Library:'dart:async' Class
NoSuchMethodError: No top-level getter 'xxx' declared.
Null check operator used on a null value
Unhandled Exception: type 'Null' is not a subtype of type 'int' in type cast
Even with top level functions, @pragma('vm:entry-point') and everything else - it just doesn't like my set up project.
Seems too rough around the edges to use at the moment. Would be much nicer to just use it like we use the "async" word.
awesome
Son los mejores
nice
Hello! @flutterdev Just wondering if there might be a chance you could PLEASE do a intro to flutter series?
I know that one was done 2 years ago but you can see my notes there - it could use some updating to say the least... in fact, to be blunt, it needs to be redone entirely, if you ask me. Again, see my notes on that playlist ( on the 3rd or maybe fourth video) long story short please please please please please do an intro to flutter series!
For the algorithm!
What if we load the file inside the isolate instead of before it?
Yeah
lit!
🔥🔥🔥
The final statement could benefit from some further explanation (outside the scope of this original video):
"Although the callback doesn't have arguments, it captures the variables it needs because it's a closure."
An explanation of "closures" specifically would be helpful, but also why I would need to be concerned with the "capturing of variables" in the first place.
Until you mentioned, "although [it] doesn't have callbacks," I hadn't even considered why that would be relevant-closure or not.
Cool
But we can't use isolate in web
What a difference between Isolate.run() and an existing compute() function? Because it works not only in Flutter but in pure Dart too?
Isolate.run doesn't work on web - so Compute() method runs the computation on the main thread on the web, but spawns a new thread on mobile. So to steal the example from the docs that made it click for me, compute(fun, message) is equivalent to await Isolate.run(() => fun(message)).
Now make Isolate work in web apps!
You should add support FOR WEB!!!
@@PhilippeMakzoume Well I dont want yo touch Javascript for anything, flutter should include web support in Dart
When is it supported web platform
Isolates.run() doesn't work on web - so Compute() method runs the computation on the main thread on the web, but spawns a new thread on mobile. So to steal the example from the docs that made it click for me, compute(fun, message) is equivalent to await Isolate.run(() => fun(message)).
Got this answer from @KhanhFlutter
Future async functions don't run in another thread as well?
No they don't. They work like async functions in Javascript.
finally
In my opinion nothing beats Kotlin Coroutines .
What's the difference between compute() method and Isolate.run()?
Anyone reading this, and wondering if isolates work in web, they don't. The design of isolates in itself isn't straight forward due to static data requirements without context passing like other languages but on web, only web workers work with quite a bit of work.
Not disuading anyone, just putting information out there.
So it’s like assynchronous code for the UI? 😂
Por favor resuelvan la incertidumbre van a cerrar o no? va hacer una tecnología muerta o no? porque no vale la pena aprender algo que no te proyecte a futuro se que para que una tecnología muera no es de la noche a la mañana pero si seria bueno saber?😭😭🙏🏻
How is this similar or different to async/await
It is different, async/await still run on the same thread in which the UI loads and can reduce the frame rates.
just make sure you don't get a race condition
Is that possible though, because the memory isn't shared. Unless, we do IO/File operations inside of it which I guess doesn't make sense to do there
@@krtirtho Memory isn't shared? What about the closure? Is everything copied?
@@HankyUSA yeah its copying which means it isn't really optimal to do like in the video for large files.
So you couldn't give it more conventional name like Thread.
can Google kill flutter
This is not even useful in most cases: you cannot use dart:ui on an Isolate, this is just ridiculous. Spawning Isolate takes more time than deserializing JSON (below 2 mb) on the main thread
It was long time ago when isolates were slow.
Now, with Isolate Groups introduced in Dart 2.15, spawning and disposing of an isolate is blazingly fast.
@@sergey_molchanovsky I tried Isolate.run() mentioned in the video, it took 300 ms to spawn, slower than deserialization on main thread (50 ms). Maybe I overlooked something?
@@sergey_molchanovsky I tried Isolate.run() and it took 300 ms to deserialize whilst on the main thread it was only 50 ms, so I cannot understand what "blazingly fast" means
@@sergey_molchanovsky maybe I overlooked something, but deserializing json with the method mentioned in the video took 300 ms when I tried it and only 50 ms on main thread
Hope youtube won't delete my comment for the 3rd time
First comment!
Thank you google you’re trying to kill your best framework 💀 WHY?
Bro tu que sabes ingles que sabes de la noticia encerio va a morir el framework?
flutter will be die
Wow...maybe you should mention that flutter is so awesome that does not support isolates on web. 2/10
Fire 🔥
nice
🔥🔥🔥🔥🔥
nice
WOah! Technique of The week, a very lovely initiative by the Team! Hoping to see a lot more useful stuff here!!