Generator Functions - Flutter in Focus

Поделиться
HTML-код
  • Опубликовано: 30 июл 2024
  • This is the fifth video in the Flutter in Focus series on asynchronous coding in Dart. In this episode, learn about generator functions (sync and async), how they work, and where to use them.
    Async and await → goo.gle/30CzAs2
    Asynchrony support → goo.gle/2JOxpum
    Flutter in Focus Playlist → goo.gle/FlutterInFocus
    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

Комментарии • 98

  • @Vertson
    @Vertson 5 лет назад +189

    I feel like this guy would give good hugs

    • @trunghvbk
      @trunghvbk 4 года назад +3

      warm and soft 😅

    • @gohamza99
      @gohamza99 4 года назад

      hahaha

    • @remoteportal
      @remoteportal 4 года назад

      "Oh, wait! I forgot to give you a hug!" - Elf

    • @sodiboo
      @sodiboo 4 года назад +7

      i feel like the entire flutter team would give good hugs, they seem very nice - or at least all of the ones who show up in the videos like flutter in focus and widget of the week - This guy really feels like flutter's mascot though in my opinion

    • @montez.youtube
      @montez.youtube 2 года назад

      a little beard rub on the top of your forehead hug

  • @GeorgeRappel
    @GeorgeRappel 5 лет назад +7

    I honestly love everything about this series and this channel. The team is great, you manage to explain everything in a clear and cool way. It really grabs our attention and makes us want to listen. Thank you!

  • @gabrielmoreyra3365
    @gabrielmoreyra3365 5 лет назад +1

    Finally! My most awaited video on this series.

  • @JustinEltoft
    @JustinEltoft 5 лет назад +1

    I love these video series. The highlight of my Friday!

  • @hammad7100
    @hammad7100 3 года назад +1

    Your Last episode is so amazing, you tell me many things about the function. I learned a lot from this video, thank you. 💞💞

  • @tantrax007
    @tantrax007 Год назад +1

    What a nice series!! I I have learned a lot. Thank you so much

  • @abbas6422
    @abbas6422 3 года назад

    You had a great experience with this great type of generator in this episode

  • @RafaelTorquato
    @RafaelTorquato 2 года назад

    Congrats for the great explanations. Very nice and useful series.

  • @michelfeinstein
    @michelfeinstein 5 лет назад +19

    Andrew, could you share a situation where a Generator saved your day?

  • @muhammadmusharaf4705
    @muhammadmusharaf4705 10 месяцев назад

    Thank you so much Andrew. you really resolved mystries this series. Thanks again man

  • @cyrilledakhlia3761
    @cyrilledakhlia3761 Год назад +4

    I love so much the high quality content you are providing on this channel. It is clear, simple, and funny. What else could we possibly ask for

    • @flutterdev
      @flutterdev  Год назад +1

      Thank you for the kind message of support, Cyrille! We love having you in the Flutter community 😎
      Be sure to check out the "Flutter in Focus" playlist here:
      goo.gle/FlutterInFocus

  • @ivanyoed
    @ivanyoed 2 года назад

    Every time I come back to this video I learn something new.

  • @arainsahab56
    @arainsahab56 3 года назад

    Respect for your knowledge you are really talented man and you wisely tells us synchronization or a synchronization its suberp

  • @mrjsue77
    @mrjsue77 3 года назад

    Thank you for telling me about these functions. You have told us a very good thing. 🤗🤗🤗

  • @mominsahib5639
    @mominsahib5639 3 года назад

    The features of generator it's functions are awesome and its streams are very fun.

  • @Shahidkhan-wl1ls
    @Shahidkhan-wl1ls 3 года назад

    You have done very well about the generator function 👏👏👏

  • @anshulsinghla998
    @anshulsinghla998 5 лет назад

    Awesome stuff. Big thanks to Andrew

  • @bulbally6384
    @bulbally6384 3 года назад

    You have given very good and good information about generator function, you have very interesting 🙏🏻

  • @martinseal1987
    @martinseal1987 5 лет назад +4

    Brilliant explanation as usual love your tone and delivery, but this one went over my head a little will yield* watch it again

    • @jajasaria
      @jajasaria 5 лет назад

      Same here. This kind of coding is something new to me. Also, Im thinking where I could implement this on my real-world application.

  • @watson9780
    @watson9780 3 года назад

    done a lot of excellent things about the generated function

  • @petrose5987
    @petrose5987 3 года назад

    The episode proved to be very sorry for me. I learned a lot from this episode, thank you very much, you made this kind of video. 💜💜💜

  • @i_mwanagenzi
    @i_mwanagenzi 2 года назад +1

    I'm so glad to have followed this series. With an amazing grasp of asynchronous programming in dart, it's off to write clean code for flutter apps and corresponding business logic. Thank Flutter team

  • @smackdown6836
    @smackdown6836 3 года назад

    Its features and streams are amazing.

  • @alexanderg1911
    @alexanderg1911 3 года назад

    Learning codes is my hobby i love this lesson

  • @LawrenceBlack
    @LawrenceBlack 2 года назад

    Hi there, Andrew Thanks great lesson, I usually use generators with BLoc design pattern

  • @FlutterExplained
    @FlutterExplained 5 лет назад +2

    Thanks for sharing. After watching it, I have just one question, why is in the fetchDoubles function with async the yield* without await?

  • @balaganesh3440
    @balaganesh3440 4 года назад

    bam it! that's great a series! we're the dart rockstars! repeat after me...

  • @khamidjonkhamidov3759
    @khamidjonkhamidov3759 3 года назад

    Amazing guy and video. Thank you!

  • @Euquila
    @Euquila 3 года назад

    My heart just fluttered in anticipation of using a generator

  • @iwandepee
    @iwandepee 3 года назад

    i fell elightened with this series (:

  • @humshrifloghain9206
    @humshrifloghain9206 3 года назад

    Excellent brother very good Generator function plan has with very good thinking

  • @thomasjefferson2127
    @thomasjefferson2127 2 года назад

    Thanks :D this was great

  • @realvideo7287
    @realvideo7287 3 года назад

    This episode is very good for generator function, I am interested in it in net function ❤

  • @andreujuanc
    @andreujuanc 5 лет назад +2

    Dart is brilliantly designed.

  • @Raimkhodzhanov
    @Raimkhodzhanov 2 года назад +1

    Thank You!

  • @hencock1036
    @hencock1036 3 года назад

    Your features are awesome And intrusted

  • @gelsonmr
    @gelsonmr 5 лет назад +8

    You won me with the "Dart rockstar" part! Hahaha
    Could you share with us more info about the situation where you needed to use async generators?

    • @RendyEzaPutra
      @RendyEzaPutra 3 года назад +1

      I found Flutter BLoC pattern tutorial, and its using async generators

  • @tractor8885
    @tractor8885 3 года назад

    I feel great generator function is very important for me 😍😍

  • @dreamfightersbn
    @dreamfightersbn 5 лет назад +1

    Thanks for this Flutter team.
    but i got distracted looking at Andrew's hair flopping down slowly
    just want to stick it back up

  • @willium3196
    @willium3196 3 года назад

    Final episode of generated function about flutter dart so well

  • @liorocker1
    @liorocker1 5 лет назад

    Now, I feel realized as an async dev... Thank you :)

  • @Malik254ke
    @Malik254ke 3 года назад

    both codes look similar this why i love coding

  • @heshansandeepa9471
    @heshansandeepa9471 2 года назад

    very nice

  • @sulaimanadewale320
    @sulaimanadewale320 2 года назад +1

    yield can be thought of as combination of return and continue

  • @magicianam1563
    @magicianam1563 4 года назад +1

    Is there anyway to get more deep information about async* / sync* / yield / yield*

  • @ve3dy
    @ve3dy 5 лет назад +12

    Hey, i want that Flutter T-Shirt how do i get it? 🤣

  • @freeitcoder20
    @freeitcoder20 3 года назад

    Flutter is genious technology for mobile development! I believe it is a future of mobile development!

  • @blank-vw2sb
    @blank-vw2sb 4 года назад +1

    I haven't even heard of generator functions before. I want all the type of things that I can do with dart. Is there a catalog?

  • @desrucca
    @desrucca Год назад +1

    6:08
    So, the yield* in async method doesnt need await keyword ?

  • @mwk240
    @mwk240 5 лет назад

    What would be a use case for a synchronous generator? I can understand the use case for async.

  • @nabil.hamawi
    @nabil.hamawi 2 года назад

    THANKS

  • @dtienloi
    @dtienloi 5 лет назад +2

    Is the animation in this video also produced by Flutter?

  • @ooow333
    @ooow333 4 года назад

    Interesting. Reminds me of the Python generator.

  • @vajohnifi3d
    @vajohnifi3d 5 лет назад +3

    anyone know where I can get the Dart Side sticker or any flutter skicker's for my laptop

    • @Iapicca83
      @Iapicca83 5 лет назад

      www.redbubble.com/people/rimek/works/25315114-dart-programming-language?cat_context=all-stickers&grid_pos=41&p=sticker&rbs=4dcde76b-0b9f-4555-9f59-3343c542650e&ref=shop_grid&searchTerm=dart

  • @unsoughtmelody
    @unsoughtmelody 5 лет назад +7

    At 4:28 you mentioned that the function turned into quadratic, but I don't see that.
    You still call the recursive function in either case once (linear). Using the yield* over the for loop seems to be just a syntactic sugar. You have to iterate through the recursive function's values in either case, yielding all values one by one eventually. Doing that with a yield* or for loop does not seem to make a difference.
    I wish you would have elaborated this further, otherwise great video!

    • @patricknasc
      @patricknasc 4 года назад +1

      Perfect comment. I just noticed the same! And got confused with the explanation at this point!

  • @sirx5x
    @sirx5x 4 года назад

    Thnx you!!!!!

  • @pradeep422
    @pradeep422 5 лет назад +5

    3:00 why dont we hav this in dart docs lol...(so clear)

  • @Ahsankhan_yt
    @Ahsankhan_yt 2 года назад +2

    Since Andrew said he used async generator function only once in last year, so I think it's safe to say that he don't use BLoC pattern while creating flutter apps. So what's your favorite state management pattern, Andrew? :)

  • @loodyyehe5332
    @loodyyehe5332 3 года назад

    What about generators and filters? Introduced to us your best and best kind. Very interesting in Urdu.

  • @TheEkkas
    @TheEkkas Год назад

    Impressive.
    await Future :)

  • @ilyassnabbar5633
    @ilyassnabbar5633 3 года назад

    A bit off subject but please enlighten me, Is it safe to say that an Iterator defines the way that an Iterable is Iterated ?

  • @danvilela
    @danvilela 5 лет назад +1

    Wow, this was awesome! I read the docs but couldn't understand it. This video cleared up my head pretty good! Thank you Flutter Team, you're awesome. Just one question though, the yield* have a name? I mean, what does it "actually" do, putting it into words?

  • @kapowrobot7942
    @kapowrobot7942 3 года назад

    Conceptually, everything is either a Iterable or Stream.
    Var X=0;
    I just created an infinite Interable that will always return 0;
    "single values" I see as one-shot Iterable or stream. after first request they become empty.
    Also is there a class that wraps around Stream that provides caching of future, so not every request needs to be a JIT execution? I guees easy enough to make one.

  • @heysuvajit
    @heysuvajit 4 года назад

    Will any one tell me what is the best use case for generators?

  • @kikikukudu61
    @kikikukudu61 5 лет назад

    0:44 jumpcut! :p

  • @spacecapitalism7152
    @spacecapitalism7152 5 лет назад +1

    Flutter + GO ain't a bad combo.

  • @shaikhsaiofali8432
    @shaikhsaiofali8432 5 лет назад

    How to paginate stream builder? Help

  • @namo5570
    @namo5570 5 лет назад

    I love you

  • @whitemagehealing8126
    @whitemagehealing8126 2 года назад

    So like a C static?

  • @RobertWildling
    @RobertWildling 5 лет назад

    Future (int val) { sleep(const Duration(seconds: 5)); return val * 2; } won't work, because the return type is not of type Future. How can this be solved?
    Thanks for this video!

  • @Zartamful
    @Zartamful 2 года назад +1

    I'm not sure that how the recursive functions stops, someone could explain me?
    Iterable getRange1(int start, int finish)
    sync*{
    if (start

    • @trinhvanquan8443
      @trinhvanquan8443 Год назад

      When start > finish. The generator stops automatically since no more yield element and function exit

  • @m.gundzi4400
    @m.gundzi4400 3 года назад +1

    I want to know about Generated Junction Flutter Infocus in a very good way

  • @vladarskopin3314
    @vladarskopin3314 Год назад

    So yield* is only used in recursive code? Somehow recursive functions always make my heart palpitate with fear :D

    • @trinhvanquan8443
      @trinhvanquan8443 Год назад +1

      No. You don't get the point.
      yield* is syntactic sugar for iteration over another generator and yield each element of that generator

  • @philosophia5577
    @philosophia5577 Год назад

    I know how to do it, because I am a Dart Rockstar!

  • @mkumar8210
    @mkumar8210 5 лет назад

    Please make video on chat app

    • @guledali8902
      @guledali8902 4 года назад

      He is my brother
      These Concepts are all for Chat apps😂😂😂😂😂😂

  • @akhilez
    @akhilez 5 лет назад

    Flutter is how mobile development should've always been

  • @MuhammadUmair001
    @MuhammadUmair001 5 лет назад

    excuse me sir
    i have a problem while installing flutter: i m not b abale to adjust path for flutter in window 8.1 ...??? will u kindly help me ????

    • @heysuvajit
      @heysuvajit 4 года назад +1

      Wrong place to ask :P

  • @shashankvats2523
    @shashankvats2523 3 года назад

    This similar to python iteration protocol

  • @Davti555
    @Davti555 5 лет назад

    where are all the haters? :o

  • @dr.watson8418
    @dr.watson8418 3 года назад

    Intrusting python generator

  • @zubairafzal6196
    @zubairafzal6196 3 года назад

    I DIDN'T UNDERSTAND

  • @lexibigcheese
    @lexibigcheese 5 лет назад

    so basically it's yield instead of addokeverybody can go now.

  • @mrliyon3585
    @mrliyon3585 3 года назад

    Thank you for telling me about these functions. You have told us a very good thing. 🤗🤗🤗