Тёмный

Dart Streams - Flutter in Focus 

Flutter
Подписаться 580 тыс.
Просмотров 259 тыс.
50% 1

This is the third video in the Flutter in Focus series on asynchronous coding in Dart. In this episode, learn about the fundamentals of reactive coding with streams. Like futures, streams deliver data asynchronously, but while a future provides a single value and stops, stream keep right on going, and provide multiple values (or errors!) over time.
For more deep dives on things like Stateless and Stateful widgets, Flutter on iOS, and other advanced topics, check out the other episodes of Flutter in Focus.
Asynchronous programming: Streams → dart.dev/tutor...
Flutter in Focus Playlist → goo.gle/Flutte...
Get started with Flutter → flutter.dev
Try a Flutter codelab → goo.gl/d3fHPo
Join the conversation → goo.gl/68oUnb
This video is also subtitled in Chinese, Indonesian, Italian, Japanese, Korean, Portuguese, and Spanish.
Subscribe to the Flutter channel → goo.gle/FlutterYT
#dart #darttopic

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 117   
@thijsoudeavenhuis999
@thijsoudeavenhuis999 5 лет назад
These videos are really helpful. Please keep making more of this useful content. I am starting to love flutter/dart more and more.
@frankemeli5918
@frankemeli5918 5 лет назад
I just love Andrew so much. His presentation is always clean and straight to the point. Thanks man!
@joelgimenez
@joelgimenez 4 года назад
Actually masterfully explained.
@WilsonSilva90
@WilsonSilva90 4 года назад
If it wasn't for these videos, I wouldn't consider Dart. Thank you, Andrew.
@mahmud-ahsan
@mahmud-ahsan 5 лет назад
Elegant way to describe the stream and related features. Thank you.
@hanifshahy
@hanifshahy 10 месяцев назад
Thanks alot! in this video I found how to solve `Bad state: Stream has already been listened to.` error.
@CprkMagicMoves
@CprkMagicMoves 5 лет назад
Really awesome widgets of flutter. Streams concept is very nice.
@viniciusqueiroz2713
@viniciusqueiroz2713 3 года назад
This video is incredibly didactic. Clear, concise, and complete. Thank you!
@Mabidakun
@Mabidakun 3 года назад
The whole team involved in the creation of these videos should be very proud of themselves. These videos are amazingly easy to follow and understand. Well done.
@Build_the_Future
@Build_the_Future 3 года назад
How would you receive and transmit to a Socket coming from a particular IP and port?
@RaitonGG
@RaitonGG 4 года назад
is it possible to "stream" videos from youtube v3 api? or does it only support gets?
@rebarius
@rebarius 5 лет назад
daaaaaaamn 👌🏼 i just used the streambuilder before that video, but the where and map functions are helping me a lot here 👌🏼
@TheChrist559
@TheChrist559 5 лет назад
How do these guys know all this stuff!!!
@harshvardhan8190
@harshvardhan8190 4 года назад
BECAUSE THEY MADE IT.... :-P
@AngelHdzMultimedia
@AngelHdzMultimedia 4 года назад
Because they used their time and effort to understand Object Oriented Programming, and read the official documentation...
@user.wioelogj3
@user.wioelogj3 5 лет назад
Hi Andrew, thank you for videos on this topic! I have a question. Does StreamController consume a lot of resources? Is it okay to have like several hundreds, maybe one thousand of active controllers in a mobile app?
@andrewbrogdon558
@andrewbrogdon558 5 лет назад
Dart is an open source language, so you can actually see the code for StreamControlle: github.com/dart-lang/sdk/blob/master/sdk/lib/async/stream_controller.dart It's built for efficiency, certainly, though I've never tried more than a dozen or so controllers at once in an app. You should consider building one yourself with a thousand StreamControllers just to see how well it performs, and then post the results on GitHub. :)
@user.wioelogj3
@user.wioelogj3 5 лет назад
@@andrewbrogdon558 Thank you!
@bikkikumarsha
@bikkikumarsha 4 года назад
Awsome as always. One of the world's best teacher. To the Point.
@CodingCatDev
@CodingCatDev 4 года назад
Coming from Angular world, are there any advantages to using pub.dev/packages/rxdart ?
@alfredoqwe
@alfredoqwe 2 года назад
?Donde está el código completo y funcionando para poder entenderlo? ?Porqué los tutoriales y manuales de Flutter son tan incompletos y confusos al punto de ser inservibles? Este tema que debería ser simple, como actualizar las respuestas de las Class y sus datos almacenados es inentendible por culpa de los malos tutoriales e información confusa sin ejemplos que funcionen , . Ni siquiera encuentro un ejemplo en la web sin error.... Mi sensación es que Flutter es de esas cosas gubernamentales que deberían ser simples, pero la casta de burocratas las hacen inentendibles, salvo para ellos. Pensar que Google vive de facilitar informaciones, parece un mal chiste....
@FlutterExplained
@FlutterExplained 5 лет назад
Great video :) thanks for sharing. Knows someone where I get that flutter / dart shirt?
@simonemonesi4961
@simonemonesi4961 3 года назад
luca
@mikem7084
@mikem7084 4 года назад
These videos make google technologies take over so fast
@hossameldinmahmoud5768
@hossameldinmahmoud5768 4 года назад
Great video, but how can I compare between streams in unit testing?
@dam.s
@dam.s 3 года назад
Excellent presentation, superb video.
@hanifshahy
@hanifshahy 10 месяцев назад
This video worths ten times to watch.
@eduardofulgencio741
@eduardofulgencio741 26 дней назад
Muy útil este video. Me anima a ver mas en este canal. Gracias
@rajdipsarvaia6641
@rajdipsarvaia6641 2 года назад
i create Stream to listen notification and i want to send reply to those notification how i am suppose to do that?
@kos9k46
@kos9k46 5 лет назад
so good rubric, thank you so much for your work
@raprincis
@raprincis 4 года назад
Rxjs like
@nichoyeah
@nichoyeah 2 года назад
Music in tutorials is a big nono. Even if it is just for a few seconds in the beginning of a video
@algeriennesaffaires7017
@algeriennesaffaires7017 4 года назад
Streams are used for what any example please?
@emdadgar_official
@emdadgar_official Год назад
any suggest to dive into deep stream projects and understand more ?
@maxwimmer8746
@maxwimmer8746 3 года назад
stupid to put in an example that is not repeatable because the stream method creates an error in dartpad.
@Lamarsh67
@Lamarsh67 4 года назад
Great video! Thanks for the clean and simple explanation.
@naderkhaled9410
@naderkhaled9410 5 лет назад
So to understand it better : A Stream is typically a List of Asynchronous Operations or values right ?
@andrewbrogdon558
@andrewbrogdon558 5 лет назад
I usually compare streams to iterators, because both of them provide values in sequence and don't let you backtrack. It sounds like you've got the idea though: a stream is just a thing that can provide multiple values over time, asynchronously.
@krtirtho
@krtirtho 3 года назад
Clearly its like traditional nodejs Stream event architecture just the names are different & with some sugary methods & syntax. nodejs: stream.on(eventname: "data"|"error"|"finish"|"pipe"|....so on, callback); dart: stream.listen((data)=>void, onError: (err)=>void, onDone: ()=>void, .... so on);
@kirill4531
@kirill4531 5 лет назад
Anyone can recommend similar great tutorials on Dart 2?
@balajir5736
@balajir5736 3 года назад
how do you dispose a stream??
@newpursuit1
@newpursuit1 4 года назад
Does anyone know why `sink` is called `sink`? Edit: found this en.wikipedia.org/wiki/Sink_(computing)
@ViralVideoMalayalam
@ViralVideoMalayalam 4 года назад
This is revolution, I mean, hard to achieve otherwise kind off things, done so easily.. but who is behind these all scenes.. google? then I doubt, it will all get monetised, some days.. for sure
@nanstay
@nanstay 5 лет назад
กรูนี่โคตรโง่ภาษาอังกฤษเลย ใครก็ได้มอบทุนไปเรียนภาษาอังกฤษให้กรูที Please... Love Flutter. This is My Frist Language programing on mobile app. 555 ฮิ้ววววว
@rullyalves7163
@rullyalves7163 5 лет назад
Thank you very much for the video, very explanatory, but I have a doubt: I always initialize the Future / Stream objects in initState, to prevent them from being recreated every call of the build method, in the video I notice that the functions that return Future / Stream theoretically are called inside the build method, thus creating these objects with each build, what would be the best way to use it?
@arthurdenner7
@arthurdenner7 5 лет назад
Hi Rully! If I understand your question correctly, one approach to prevent the Future from firing in every build is to use AsyncMemoizer. Check this link: medium.com/saugo360/flutter-my-futurebuilder-keeps-firing-6e774830bc2
@andrewbrogdon558
@andrewbrogdon558 5 лет назад
Great question. In these videos, we're often forced to shorthand some things and/or leave out details in order to get the code down to a size that actually fits on the screen (see 7:12 for an example of how hard this can be). As a result there are times when we show something like the FutureBuilder at 6:38 that looks like it's initializing a new network request on every build. That wouldn't be a good practice, but the point of that slide is mostly just to show that FutureBuilder takes a Future and a builder, and anyone who sees the name "_fetchNetworkData" can hopeful recognize it as a stand-in for something more sophisticated. That said, you're completely correct that under normal conditions, you don't want to be creating Futures in a build method. Flutter expects build methods to be fast and side effect free, because it needs to be able to call them often (sometimes in ways that can be surprising -- try tracing the builds caused by a Navigator pushing and popping routes some time). As a result, if you're actually *creating* a Future or Stream, it's probably best done in a State object's initState, a class held by an InheritedWidget, or something like that.
@dhamodharanm1810
@dhamodharanm1810 3 года назад
I am using background location, from the location callback I am adding the stream but even though the app is in foreground the listener is not working. How to send data/trigger from background location callback to foreground screen
@paralysekid
@paralysekid Год назад
Very nice presentation, easy to understand and with helpful visuals for each step. Thanks.
@mohitmodh5584
@mohitmodh5584 4 года назад
i am not getting how to use "asBroadCastStream" , I can't find any proper example regarding that.
@chrisik100
@chrisik100 5 лет назад
Lessons for the kids, I knew that from the web)
@mustofa_id
@mustofa_id 5 лет назад
Yes grandpa
@saqib399
@saqib399 2 года назад
Very Helpful
@segundojaramilloromero9909
@segundojaramilloromero9909 4 года назад
how to stop the subscription of a stream of a singleton class, and when re-creating the subscription do not continue the data of that stream.
@codezero1015
@codezero1015 Год назад
You are intelligent
@kentthomas1045
@kentthomas1045 3 года назад
I'm trying to implement a stream as a number showing up in a container, are there any tutorials on this?
@heshansandeepa9471
@heshansandeepa9471 2 года назад
very nice
@shahidwani6445
@shahidwani6445 4 года назад
I think It is like IAsyncEnumerable in C#.
@nahideducational
@nahideducational 11 месяцев назад
nice explanation
@dhavalparmar9554
@dhavalparmar9554 4 года назад
I have a nested firebase collection in my flutter app . I want to listen to the inner collection. How can I achieved that with a stream builder.
@fabianosantana6052
@fabianosantana6052 5 лет назад
I love this videos, I so helpful
@akhilrajnambiar2080
@akhilrajnambiar2080 Год назад
Could these explanations be any more simpler!! Just awesome 🔥🔥
@MyGarvas
@MyGarvas 5 лет назад
Thanks so much, fantastic content. Greetings from Brazil.
@gamedeathmatch
@gamedeathmatch 2 года назад
This literally helped me solve a problem I have been stuck on for 3 hours, thanks
@chandranathgupta4500
@chandranathgupta4500 4 года назад
Nice Explanation. Thank you
@jakubiwanicki8884
@jakubiwanicki8884 2 года назад
thank u bro
@HandikaHarisaputra
@HandikaHarisaputra 4 года назад
Thank you for the information, sir
@valentingarcia2246
@valentingarcia2246 3 года назад
great video
@ehsanhasin8092
@ehsanhasin8092 Год назад
thank you
@josecoverlessons
@josecoverlessons 5 лет назад
Flutter for the fucking win bro!
@ezequielpereira4160
@ezequielpereira4160 Год назад
Muy util
@petrushoc
@petrushoc 5 лет назад
LOVE RXDART
@marcoantonio7648
@marcoantonio7648 4 года назад
the redux part (which can avoid the use of == overwriting in some cases) and the stream controller was amazing!
@MohamedAli-vr9mw
@MohamedAli-vr9mw 4 года назад
This man should get Oscar in explaining difficult topics
@fethisert5527
@fethisert5527 Год назад
thanks
@saguoran
@saguoran 5 лет назад
I tried the stream, but I could use the streamController the add data, why do we need the sink to add data?
@guledali8902
@guledali8902 4 года назад
This is Called Channels in Elixir😅😅😅
@alexneeky7920
@alexneeky7920 5 лет назад
very good video, more real life examples would be great though
@AceHardy
@AceHardy 4 года назад
🚀💯
@jaanaan143
@jaanaan143 Год назад
One of the best intro for Streams.
@jagdishshetty4782
@jagdishshetty4782 4 года назад
Great explanation. Thx !!!
@maran.ath4
@maran.ath4 2 года назад
3:10
@calpal101
@calpal101 2 года назад
4:41
@brianl6329
@brianl6329 3 года назад
Fantastic. Thankful.
@juanmamani2110
@juanmamani2110 2 года назад
I should fall in love with Dart Streams.
@mobiledev5295
@mobiledev5295 2 года назад
how to end one?
@marcinadamczewski6067
@marcinadamczewski6067 5 лет назад
You said that the `cancelOnError` is true by default. Looks like it is false by default, which is quite important to remember about :)
@AngelHdzMultimedia
@AngelHdzMultimedia 4 года назад
That's what the official documentation is for. This person is just using his free time and effort, to explain in detail FOR FREE for people that are lazy to learn by themselves, so, it's totally valid that they could confuse some things at times. It's your responsibility to read the manuals, instructions, etc. And even sometimes, instructions have errors/mistakes, because we are humans, we make mistakes. So if you find something wrong, you have the responsibility of KINDLY letting them know to fix it, not being all entitled and offended because "the teacher dared to make a mistake".
@marcinadamczewski6067
@marcinadamczewski6067 4 года назад
@@AngelHdzMultimedia Take it easy man. I just mentioned the mistake so others can see that or the author could add an annotation to the video. I can't see anything unkind or offending here. I'm not a native english speaker though so let me know what is wrong :)
@yuchen52
@yuchen52 4 года назад
that's incredible clear!
@tawsan646
@tawsan646 3 года назад
thank you Sir.
@aben8763
@aben8763 4 года назад
What is the point of Kafka when you master these ?
@aben8763
@aben8763 4 года назад
when no clustering is there
@walrider7374
@walrider7374 5 лет назад
why use rxdart then?
@GurdeepSingh-gr7fb
@GurdeepSingh-gr7fb 5 лет назад
Greetings to all flutter Developers here.
@Digitaln8
@Digitaln8 5 лет назад
Where can I get that shirt?!
@batuhankrbb
@batuhankrbb 3 года назад
You're killing it
@zurabn1281
@zurabn1281 3 года назад
Nice, really nice.
@dennougorilla8861
@dennougorilla8861 5 лет назад
Why not use `switch case` in ConnectionState?
@dennougorilla8861
@dennougorilla8861 5 лет назад
I think better following. switch (snapshot.connectionState) { case ConnectionState.waiting: ... case ConnectionState.done: ... default: ... }
@abou3542
@abou3542 5 лет назад
Great Post !!! Beautiful t-shirt
@karlbooklover
@karlbooklover 5 лет назад
why is this unlisted? :(
@andrewbrogdon558
@andrewbrogdon558 5 лет назад
We upload files a few days early so our translation team can access them to create captions and subtitles. This one was accidentally added to the Flutter in Focus playlist before its real release date, which (I'm guessing) is how you found it. Do me a favor and don't tweet the link for a few days. :)
@ahmedbaoun4084
@ahmedbaoun4084 5 лет назад
@@andrewbrogdon558 pretty sure he didn't tweet it
@mahmoudbasuony3193
@mahmoudbasuony3193 5 лет назад
@@andrewbrogdon558 Thank you very much
@Deliriummorphium
@Deliriummorphium 5 лет назад
@@andrewbrogdon558 Ok
@josiahsaunders4936
@josiahsaunders4936 4 года назад
VERY clear and helpful :) Thank you!
@andreujuanc
@andreujuanc 5 лет назад
Dart is so elegant man.
@rezaasgary1442
@rezaasgary1442 5 лет назад
This is so helpfull thanks
@maxan2121
@maxan2121 3 года назад
너무나 유익한 강의 감사합니다!
@Klazyo
@Klazyo 4 года назад
thanks
@GeekyGagan
@GeekyGagan 5 лет назад
awesome!!!
@baskee
@baskee 5 лет назад
This videos are so good!
@dmitriiegorov1888
@dmitriiegorov1888 4 года назад
Thanks a lot for your explanation of Stream. It seemed hard at first, but a bit later it has become very clear.
@NishaSharma-hd6qw
@NishaSharma-hd6qw 5 лет назад
Could you please make a demo for playing DRM(encrypted) videos with flutter
@sachinmittal65
@sachinmittal65 4 года назад
I want to build an app that fetches my current location value even if the user is not using the app and matches the current location value with the location value stored in the DB and then do some task (all things are done in the background). How can I do that in flutter? Pls, anyone help me...
Далее
Dart Futures - Flutter in Focus
8:55
Просмотров 200 тыс.
ОБЗОР НА ШТАНЫ от БЕЗДNA
00:59
Просмотров 355 тыс.
# Rural Funny Life Wang Ge
00:18
Просмотров 673 тыс.
Ко мне подкатил бармен
00:58
Просмотров 137 тыс.
Async/Await - Flutter in Focus
9:11
Просмотров 206 тыс.
When, why, and how to multithread in Flutter
15:10
Просмотров 64 тыс.
065 - Stream - in Dart
24:58
Просмотров 1,1 тыс.
How Flutter renders Widgets
26:50
Просмотров 189 тыс.
Learn to use Isolates in Flutter | Simplified
10:28
Просмотров 28 тыс.
Generator Functions - Flutter in Focus
6:54
Просмотров 145 тыс.
ОБЗОР НА ШТАНЫ от БЕЗДNA
00:59
Просмотров 355 тыс.