List Method .map() in Dart and Flutter

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ค. 2024
  • In this series, we will learn more about different list methods in #Dart and see how we can use them in #Flutter. In this episode, we have a closer look at the #map method in different list types and see how we can use this method to create DataRows in a DataTable out of the input text in the FormInputFlields in a flutter application.
    If you want to see Max live coding, join him on: / maxexplaines
    You like our work and would like to support us, feel free to join us on Patreon.
    / flutterexp
    00:00 - Introduction
    00:30 - Example one: sort method explanation on a list of integer
    01:36 - Example two: sort method on the list of String
    02:15 - Example three: sort and forEach method on a list of object
    04:12 - Overview over the boilerplate code
    04:151 - map method to create DaraRow in DataTable
    06:55 - Outro
    Tools we use to grow our TH-cam channel
    TubeBuddy Review - Manage Your TH-cam Channel Easily
    www.tubebuddy.com/flutterexpl...
    Our current TH-cam gear
    🎙 Samson Mic: amzn.to/324Gpof
    📟 Satechi USB-C Adapter: amzn.to/3kUdQ5M
    💻 MacBook Pro: amzn.to/3iQ9MBx
    📹 Lumix FZ1000: amzn.to/3g7tW8D
    ⭐️⭐️Helpful Ressources ⭐️⭐️
    DartPad: dartpad.dev/762550ff944018d50...
    GitHub Repository: github.com/mt-tadayon/map_tut...
    ⭐️⭐️Follow us ⭐️⭐️
    Twitter Mahtab - / mahtab_dev
    GitHub Mahtab - github.com/mt-tadayon
    Twitter Max - / flutter_exp
    Github Max - github.com/md-weber
    Homepage - flutter-explained.org/blog
    ⭐️⭐️ Support ⭐️⭐️
    If you read this so far, thank you once more. If you like to support us, here are some links that could help us a lot.
    Donation via BuyMeACoffee - www.buymeacoffee.com/flutterexp
    Amazon Affiliate Link - You buy for the same price and I get a small amount of it. This leads to an amazing Flutter book that I can recommend to every beginner of flutter amzn.to/2uOJXON

ความคิดเห็น • 83

  • @YBWang-pi9qq
    @YBWang-pi9qq 2 ปีที่แล้ว +6

    Your way of teaching is well to the point! You make it simple, practical, easy to understand.
    Please make more video like this.

    • @FlutterExplained
      @FlutterExplained  2 ปีที่แล้ว

      Amazing, we are glad that you like it. Thanks for your feedback :)

  • @abraiyan7984
    @abraiyan7984 4 ปีที่แล้ว +2

    You are a great instructor, keep making contents for us. Thanks.

  • @millennialsmusic1137
    @millennialsmusic1137 3 ปีที่แล้ว +4

    I have to say it !!! Amazing content ......I've tried so much to work with maps in Dart and it seemed so complicated to understand but after this video I have to confess everything is much clearer ....You just won me ....Put more content about the maps and working with maps please maybe some exercises and example like in this this .....Thumbs Up!

  • @gefallenesobst6855
    @gefallenesobst6855 2 ปีที่แล้ว +1

    really helped me out so quickly! thanks!!

  • @arjunsherpa3826
    @arjunsherpa3826 3 ปีที่แล้ว +3

    yes,, good to see such a nice tutorial on map...

  • @user-sp6ul5vh4s
    @user-sp6ul5vh4s 2 ปีที่แล้ว +1

    Thanks a lot ♥️ it is easy to understand and so helped to me

  • @Jan123.
    @Jan123. 4 ปีที่แล้ว +2

    Great tutorial. Please do more of beginner tuts. Thanks a lot!

  • @yonathanhailemelekot5238
    @yonathanhailemelekot5238 2 ปีที่แล้ว +2

    Amazing explanation. thank you mam.

  • @asbelfernandez3081
    @asbelfernandez3081 2 ปีที่แล้ว

    I love the way you explain your content. Please make a video on how to get data from multiple document fields from firestore and store it in an array for use.
    Thank you!

  • @njengathegeek
    @njengathegeek ปีที่แล้ว

    She is such a nice instructor, That's why I love the channel 😘😘

  • @prathamesh3299
    @prathamesh3299 3 ปีที่แล้ว

    your tutorials are great

  • @delarrampoudel4561
    @delarrampoudel4561 ปีที่แล้ว +1

    Thank you to share like this video. Really easy to understand please create more like this content 💌

  • @almamun2565
    @almamun2565 3 ปีที่แล้ว +2

    You are really great, I got what i am looking for, explained well, thanks for sharing, please carry on!

  • @levitheackerman1481
    @levitheackerman1481 3 ปีที่แล้ว

    Nice sis, love this channel😍

  • @rafiulrafi9715
    @rafiulrafi9715 2 ปีที่แล้ว

    this one is very helpful.

  • @irhas6555
    @irhas6555 2 ปีที่แล้ว

    Great 👍

  • @jrheisler
    @jrheisler 4 ปีที่แล้ว +1

    Well done!

  • @ahmeedev
    @ahmeedev 2 ปีที่แล้ว +1

    Thanks

  • @adogpersonblog4176
    @adogpersonblog4176 3 ปีที่แล้ว +1

    nice and easy!

  • @chiaseamme424
    @chiaseamme424 2 ปีที่แล้ว +1

    good video

  • @shubhamchoudhary7527
    @shubhamchoudhary7527 3 ปีที่แล้ว +1

    you're a great tutor

    • @FlutterExplained
      @FlutterExplained  3 ปีที่แล้ว

      Thank you very much for your kind words :)

  • @JohnSon-th5qx
    @JohnSon-th5qx ปีที่แล้ว

    Helpful☺

  • @ezhilarasans1305
    @ezhilarasans1305 3 ปีที่แล้ว

    when click icon to show list . But I need the listView data on the next page how to do it?

  • @technicalradar3408
    @technicalradar3408 3 ปีที่แล้ว +1

    Hi Can you Create an example of creating a List of widgets using .map .toList() method and change the state on click ...
    State Management

  • @ismailhossain4730
    @ismailhossain4730 ปีที่แล้ว

    thanks

  • @sudhirmanandhar4818
    @sudhirmanandhar4818 4 ปีที่แล้ว +3

    Please do video on working with android internal memory like finding all the pdf files,mp3files etc

  • @zainali717
    @zainali717 3 ปีที่แล้ว

    how can I change the text color of these lists ?

  • @OmerFaruk-lb5zy
    @OmerFaruk-lb5zy 2 ปีที่แล้ว +1

    I fell in love with your accent.

  • @matheo4934
    @matheo4934 2 ปีที่แล้ว +2

    i really hope you guys make Udemy video lecture series. so that i can buy and learn more efficiently. as always, great content. instant Subscribed.

  • @user-qr9pe5hw7d
    @user-qr9pe5hw7d 2 ปีที่แล้ว

    If we have reference variables that refer to the same object
    I need an example Flutter ui for a screen or a part of the screen that we can use
    Dart Singleton Pattern Using Factory Constructor

  • @rv9570
    @rv9570 2 ปีที่แล้ว

    Please if possible create a series on map method . Thanks in advance

  • @Kumar2k12
    @Kumar2k12 2 ปีที่แล้ว +1

    Help me to Write a function or method (Flutter) which takes as input 2 lists, and returns a result list I mean in one list length, width, height and their values and in another list volume and density etc and returns value of volume and density etc

    • @FlutterExplained
      @FlutterExplained  2 ปีที่แล้ว +1

      This could maybe help you :) dartpad.dev/?id=b5565b63064dd344107ecfce124f824b&null_safety=true

  • @procoaches
    @procoaches 4 ปีที่แล้ว +1

    Waiting to see 3k 🤩

  • @hamzashehzad7273
    @hamzashehzad7273 ปีที่แล้ว

    Very nice content plz work on maps

  • @gbedjidamien5232
    @gbedjidamien5232 3 ปีที่แล้ว

    Hi,how to use list of map please?

  • @havefun5519
    @havefun5519 2 ปีที่แล้ว +1

    Is the .map() at Flutter is the same with Javascript, my API call is List, and it's can't work at .map(), very confusing

    • @FlutterExplained
      @FlutterExplained  2 ปีที่แล้ว

      Hi there, yes the .map() function is quite similar the equivalent of a JavaScript Array is the List in Dart. Therefore you are able to work in there nearly the same way. I hope that clears things up :)

  • @karanrocks4447
    @karanrocks4447 2 ปีที่แล้ว +1

    1:20.. Who will provide num parameter to that function ? Can u plz tell me

    • @FlutterExplained
      @FlutterExplained  2 ปีที่แล้ว

      Sure, the List is a List of numbers (List) if you use "map" now on that List you will need to pass in a method that gets called every time when the pointer goes from one number to another number.
      [>12 (12) => 12 * 2; // returns a array [24]
      [12, >15 (15) => 15 * 2; // returns a array [24, 30]
      [12, 15, >16 (16) => 16 * 2; // returns a array [24, 30, 32]
      >12< represents the pointer
      But because we do not want to write 3 times the function we can use the .map function. I hope that made it a bit clearer for you :)

    • @karanrocks4447
      @karanrocks4447 2 ปีที่แล้ว

      @@FlutterExplained Thanks a lot ☺️.. It is really helpful. I understood ❤️

  • @thushankalana4940
    @thushankalana4940 9 หลายเดือนก่อน

    Madam, How to pass realtime data base values into List🙂

  • @hello__india
    @hello__india 2 ปีที่แล้ว

    Respected mam
    Can you please help me
    Can you give example programe
    1. how to use class in a map and list
    2. Program of dice in a dart using class

  • @krishnasairajponneboina7226
    @krishnasairajponneboina7226 ปีที่แล้ว

    type 'List' is not a subtype of type 'List' in type cast how to solve this error

  • @sadiqali5238
    @sadiqali5238 3 ปีที่แล้ว +1

    Can I remove added item from list
    (enter by mistake)

    • @sadiqali5238
      @sadiqali5238 3 ปีที่แล้ว

      And also add quantity of Item

    • @FlutterExplained
      @FlutterExplained  3 ปีที่แล้ว +1

      There are couple of methods that you can use to remove an element in a list. You can use .remove(), .removeAt() or removeWhere() etc. www.woolha.com/tutorials/dart-removing-elements-from-list-examples

  • @abduallah8079
    @abduallah8079 2 หลายเดือนก่อน

    Can you make a condition that if the name is Alex ‘ the message should be “my best friend is Alex else the text “They are normal friends.

  • @mohammadrezakarimi9209
    @mohammadrezakarimi9209 ปีที่แล้ว

    آموزش هاتون خیلی عالیه پرچم بالا

  • @amitkumarpandey963
    @amitkumarpandey963 ปีที่แล้ว

    Make video on Date schedule

  • @santoshkawale21
    @santoshkawale21 3 ปีที่แล้ว

    great tutorial....just adjust sound issue...

  • @mtrk_79274
    @mtrk_79274 2 ปีที่แล้ว +1

    Thanks. This video was very helpful. But the sound(Voice-Over) is low. Just try to improve that.

  • @user-zl8zm2re4p
    @user-zl8zm2re4p 8 หลายเดือนก่อน

    👍

  • @MohaMed-AdeL1
    @MohaMed-AdeL1 3 ปีที่แล้ว +2

    please zoom in when coding because this need high resolution to show thank you

    • @FlutterExplained
      @FlutterExplained  3 ปีที่แล้ว

      We will try to improve in that in the future, sorry for the inconvinience.

  • @BhupeshRajShakya
    @BhupeshRajShakya 3 ปีที่แล้ว +1

    I think audio is broken!! If it doesn't work go to settings of ur device and enable mono

    • @FlutterExplained
      @FlutterExplained  3 ปีที่แล้ว +1

      Yes we figured that out to late unfortunate :) but thanks for the tip with mono though!

    • @BhupeshRajShakya
      @BhupeshRajShakya 3 ปีที่แล้ว

      And thank you for wonderful tutorial

  • @kuotatri
    @kuotatri 4 ปีที่แล้ว +2

    the audio is not stereo

    • @FlutterExplained
      @FlutterExplained  4 ปีที่แล้ว

      Uh, that is bad, thanks for letting us know. We will check if we can fix that somehow and hopefully we can prevent it from future recordings.

  • @prajwalshrestha3500
    @prajwalshrestha3500 3 ปีที่แล้ว +1

    I am a totally beginner, maybe thats why I didn't understand the last part of dartpad

  • @LilaMili
    @LilaMili 3 ปีที่แล้ว

    Make a app where you can add some data it will store in your list. And view that list

  • @rmq8381
    @rmq8381 3 ปีที่แล้ว

    I was about to buy a new headset

  • @athrian
    @athrian 3 ปีที่แล้ว

    why is there no sound?

    • @FlutterExplained
      @FlutterExplained  3 ปีที่แล้ว

      Sorry the video is only on one side recorded :/ (mono)

  • @johirislam2640
    @johirislam2640 4 ปีที่แล้ว +1

    Don't u have fb account

    • @FlutterExplained
      @FlutterExplained  4 ปีที่แล้ว

      No, we don't have fb. But you can reach out to us on Twitter ;) Mahtab: @mahtab_dev, Max: @flutter_exp

  • @SantoshYadav-lc3hi
    @SantoshYadav-lc3hi 2 ปีที่แล้ว

    how to pass images in list by using map().

  • @ketan7798
    @ketan7798 4 ปีที่แล้ว +2

    Hi, Tutorials are too good. Just get rid of this sound problem. Even with headphones the sound wad too low and only one side of headphone was firing, to be specific the left one. There was no sound at all from the right side

    • @FlutterExplained
      @FlutterExplained  4 ปีที่แล้ว

      Thanks for your feedback. We will try our best to avoid the sound problem for our future tutorials.

  • @blake4546
    @blake4546 2 ปีที่แล้ว

    i thought my right ear was deaf

  • @dmninfo
    @dmninfo 3 ปีที่แล้ว

    Левому уху понравилось (нет)

  • @sandwichtube
    @sandwichtube 3 ปีที่แล้ว +1

    Going too fast.

    • @FlutterExplained
      @FlutterExplained  3 ปีที่แล้ว +1

      Sorry to hear that, you can reduce the speed in the TH-cam Player if you press on the cog and then select player speed, I hope that helps you.