Flutter Tutorial - Dart List Utility Methods: ForEach, Map, Contains, Sort, Reduce, Where, Expand

Поделиться
HTML-код
  • Опубликовано: 24 янв 2025

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

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

    This might help you :)
    👉 12 Week Flutter Training from Newbie to Expert: heyflutter.com
    Source Code: github.com/JohannesMilke/list_utility_example
    Flutter Layout Basics Tutorial: ruclips.net/video/yYxueTNIDlA/видео.html
    Stateful Widget Lifecycle Tutorial: ruclips.net/video/FL_U8ORv-2Q/видео.html
    Hello World Flutter App Tutorial: ruclips.net/video/UPSsxGQRIzs/видео.html
    Add Custom Fonts Tutorial: ruclips.net/video/Gf-cyiWlmEI/видео.html
    Search & Filter In ListView Tutorial: ruclips.net/video/oFZIwBudIj0/видео.html
    App Bar Tutorial: ruclips.net/video/dHBF4IJZvHk/видео.html
    Search Bar & Search Delegate Tutorial: ruclips.net/video/RaACAwvZ61E/видео.html
    TextField Tutorial: ruclips.net/video/C5hJIKCTrvk/видео.html
    Buttons 2.0 Tutorial: ruclips.net/video/ytlDKJBxW_A/видео.html
    Form & TextFormField Tutorial: ruclips.net/video/2rn3XbBijy4/видео.html
    SafeArea VS AppBar Tutorial: ruclips.net/video/4O16fHaJc7E/видео.html
    Sortable DataTable Tutorial: ruclips.net/video/SJxByHLs72k/видео.html
    Selectable DataTable Tutorial: ruclips.net/video/HZD-0zgpuak/видео.html
    Create PDF Invoice Tutorial: ruclips.net/video/z_5xkhEkc5Y/видео.html

  • @farhanahmad-bv1mx
    @farhanahmad-bv1mx 2 года назад +1

    Lots of appreciation and love from India🇮🇳

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

    This was the best. Easy to understood method. Please create this kind of videos . It is very easy to understood everything. Other many videos are for advance user and not understandable by learner. I hope you got my point.

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

      Thanks for the idea, @rv9570! 🙂 I have added it to my list of ideas for future videos!

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

    Man!! Your map explanation was not only the best that I saw but the only one that I understood!!! Finally I know how to use and what is the purpose of .toList() at the end!! thanks God, ops, thanks Johannes!!!!!!!!!!!!! Viva la vida!!!

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

      This is not the purpose of the .toList() at the end. The reason we need it is that .map() produces an Iterable type (MappedIterable) instead of a List type. So if you want a List type, you have to convert it to a list with .toList();
      So if you only need an Iterable (not specifically a List), you don't have to put .toList(), it will produce a new object anyway.

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

      Thanks, OroshiX! 🙂 Yes, you are right, thanks for sharing your knowledge, great explanation! In the end, the Iterable is the parent class of the List class, which supports stepping through the values of a list. At 2:09 I just mentioned that you need to call .toList() since our input was List and therefore our output should be also of the type List and not Iterable.

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

    You're literally a genius.

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

      @@HeyFlutter just never stop doing your flutter video. I'm becoming an expert with them. Firebase, frontend, backend, error fixing, widget explanation, and courses upgrade. I'm sending power to you from France. ❤️🔥✨

  • @PaulMcKillop
    @PaulMcKillop 3 года назад +2

    Thanks, Johannes. Straightforward, comprehensive, and logical.

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

    New to flutter here. I found something ready-made that I could use in my project, but I was having a hard time replicating it because I didn't understand the concept and the basics behind it. You made it crystal clear, and now I don't have to use the ready-made code; instead I can build it from scratch. Thank you so much. Of course, I subscribed and liked your video.

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

    Great Brother, you are the best teacher I ever had.....

  • @farhanahmad-bv1mx
    @farhanahmad-bv1mx 2 года назад

    It's a very helpful, fantastic explanation vedio

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

    Thank you so much for your video you have saved my from a big problem

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

      Glad I could be of help, Thank you Essa Jamal! 😊

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

    Love u So Much Brother You Save my Life Always

  • @RajA-me9cl
    @RajA-me9cl 3 года назад

    Thank you, Johan. I really enjoyed this video.

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

    very useful video!

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

    You are very helpful 👍

  • @BlueSama1
    @BlueSama1 3 года назад +2

    So helpful 🔥

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

    You are better and more efficient teacher. :)

  • @farhanahmad-bv1mx
    @farhanahmad-bv1mx 2 года назад

    Thanks a lot Sir

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

    Johannes Milke Rocks...🙏🙏

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

    simple and useful, good job

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

    Thanks for the info! Streightforward and helpful

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

    Bro! How to retern & show on ListView this List "Bike" by/with new "horspover" value ... what you show on 14:33 by expand ???

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

    Thank you!

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

      Hi Louis is jy van RSA?, ek is Pierre

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

      @@pierremarais7669 Inderdaad. Was lanklaas so opgewonde oor iets soos wat ek is oor Flutter.

  • @md.shazidalhasan6726
    @md.shazidalhasan6726 2 года назад

    thanks

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

    Thank you

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

    Awesome Content. To the point and useful.

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

    Great tutorial. pls make a video on Navigation for web and mobile. e.g web has sidebar navgation on click again and again every route inserted in stack. this is the big problem in flutter for web

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

    Great!

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

    Very usefull

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

    Spread operator & Null-aware operator on Lists, Maps and Sets in Dart
    Spread operator & Cascade Operator What is the function of each?
    And when do we use each? also witch using with Map witch uing with list?

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

    Hi Johannes, if I have duplicated objects in the list e.g. if you have two Hondas in your bikes list, how would you compress or remove the duplicate item?

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

      @@HeyFlutter many thx

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

      Thanks, Gustavo Menezes! 🙂
      You can remove duplicate items from list, like 2 Honda bikes in your case. Simply refer to this solution : stackoverflow.com/a/51446910

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

    how can I replace an item in a list with another item in the same index? (ie delete an item and place another item in the same place as it was)

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

      @@HeyFlutter Thanks, it was a big help! I'm from Brazil and I love your videos

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

      Hello, Igor miranda souza! Follow this link: stackoverflow.com/questions/63757050/flutter-replacing-an-item-in-a-list, I hope it will solve your problem. Thank You 🙂

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

    Hello, bro. Do you have videos for testing? If you haven't, can you give me the source, please😊

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

      Thanks, Qadir! 🙂 Nope, I don't have testing videos. Simply read more about it here: flutter.dev/docs/testing

  • @oroshix
    @oroshix 3 года назад +2

    Thanks Johannes for all your videos and their simple explanations.
    Be careful, there is an error in your map explanation:
    This is not the purpose of the .toList() at the end. The reason we generally need it is that .map() produces an Iterable type (MappedIterable) instead of a List type. And generally, widgets accept only List type. So if you want a List type, you have to convert it to a list with .toList(). In this case, because you use it with [...iterable], you don't need a .toList()
    So if you only need an Iterable (not specifically a List), you don't have to put .toList(), it will produce a new object anyway. Moreover, this Iterable is lazy, so we can chain several calls without worry about performance.
    See here for the documentation: api.dart.dev/stable/2.12.2/dart-core/Iterable/map.html (it always produces a new object)

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

      Thanks, OroshiX! 🙂 Yes, you are right, thanks for sharing your knowledge, great explanation! In the end, the Iterable is the parent class of the List class, which supports stepping through the values of a list. At 2:09 I just mentioned that you need to call .toList() since our input was List and therefore our output should be also of the type List and not Iterable.

  • @АлександрИванов-ю8с8г

    cool

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

    👌

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

    why is there no automatic translation into Russian (

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

      Thank you, Flutter_kn! 🙂 Yep, this is strange, normally RUclips is generating these captions automatically.