Flutter Tutorial for Beginners #17 - Lists of Data

Поділитися
Вставка
  • Опубліковано 15 жов 2024

КОМЕНТАРІ • 149

  • @unknown-dx7fd
    @unknown-dx7fd 4 роки тому +241

    'Be yourself; everyone else is already taken',
    'I have nothing to declare except my genius',
    'The truth is rarely pure and never simple'

    • @katsuraeikichi919
      @katsuraeikichi919 4 роки тому +2

      lol thanks

    • @prenom_nom
      @prenom_nom 4 роки тому +3

      thanks mathias

    • @unknown-dx7fd
      @unknown-dx7fd 4 роки тому +5

      @@prenom_nom no problem hope you are doing great with trying to learn flutter

    • @mysterOrel7924
      @mysterOrel7924 4 роки тому +1

      @@prenom_nom mdr c'est quoi ce Nom et ce Prénom ahahha Love it !

    • @raducamman
      @raducamman 4 роки тому

      God bless you!

  • @HarshDivecha_FTR
    @HarshDivecha_FTR 5 років тому +113

    You're Amazing buddy. If only school curriculum were like this and teachers were like you world could be a better place.

    • @yuvrajadkar
      @yuvrajadkar 3 роки тому +2

      Total agree. Content delivery is extremely good. He is just perfect.

  • @leondaz
    @leondaz 4 роки тому +41

    Thank you! I watched 16 videos in a row then slept 2 hours & here I'm in the 17th, Gonna finish the this playlist today.

    • @NetNinja
      @NetNinja  4 роки тому +7

      Awesome! :D

    • @adnanhaider9949
      @adnanhaider9949 3 роки тому +11

      @@NetNinja please make course for intermediate or advance level in flutter ..

  • @invictuswarriormotivation
    @invictuswarriormotivation 3 роки тому +30

    Map Function easy explained:
    It is the same like a foreach loop
    This means, for every item in your list do something
    For example here we have a list with name Quotes.
    We say with .map that loop/go for each item in this list (here we have 3 strings (be yourself..., "i have nothing.,.." ,"the truth ..." ) and do something.
    He say for every item in this list give me a text widget back with the value of the item (be yourself... ) i think u know what i mean.
    The thing is we have now multiple Text widgets and we have to do the .tolist() because this stores all text widgets in a list.

    • @nareshshewkani8815
      @nareshshewkani8815 2 роки тому +2

      Nicely related!! Just to add, it returns a iterable(Collection) which we convert to anather type of iterable called Lists by using toList() function

    • @PanosPitsi
      @PanosPitsi Рік тому

      Coming from web dev after I got used to the oop patterns everything just clicked.

  • @thunderemperor7553
    @thunderemperor7553 4 роки тому +42

    Today is my day 5 in flutter and I am in episode 20 in this series and I came back to 17 again because this is the point where all the confusion started. Up to episode 16, it was quite easy to catch everything. Making a widget tree and adding its properties is now used to for me but making list, passing parameters, map() function is complicated to understand. So I am revising it once again.

    • @motodankz4838
      @motodankz4838 Рік тому +2

      I know it's been 3 years since your comment, but .map() is used through many programming languages to iterate over a list. But since it's been this long you probably have learned that already and excel at this :)

    • @blackflame_
      @blackflame_ Рік тому +1

      @@motodankz4838 Thanks for your comment I learned something new

    • @SaitamaMixed
      @SaitamaMixed 7 місяців тому

      ​@@motodankz4838 well, I know c, c++, java, c# and lua. Yet, I never used map() fun or never seened it before.

    • @antoniofuller2331
      @antoniofuller2331 4 місяці тому

      LMAO

  • @abspro2241
    @abspro2241 4 роки тому +6

    From Malaysia with love to the greatest teacher of programming, Shaun Pelling.

  • @yuvrajadkar
    @yuvrajadkar 3 роки тому +11

    Hi
    I could not resist myself from writting comment, which i generally dont. I just wanted to show gratitude and say thanks for your dedicated efforts towards explaining every minute detail required to grab complete control over flutter. I was roaming around multiple channels rarely hoping for something like this. You are awesome!!!

  • @Th3xPro
    @Th3xPro 5 років тому +23

    “Be yourself; everyone else is already taken.”
    - Oscar Wilde
    Another point for me!

  • @mansoormohamedali
    @mansoormohamedali 2 роки тому +12

    The widgets he uses in this video:
    - StatefulWidget{}
    - Scaffold()
    - AppBar()
    - Text()
    - Column()

  • @MrAlwandawi
    @MrAlwandawi 3 роки тому +2

    I just want to say.. this is the best video on youtube which explains Map in flutter... YOU ARE THE BEST ..

    • @NetNinja
      @NetNinja  3 роки тому +1

      Thank you so much 😀

  • @theo3401
    @theo3401 4 роки тому +4

    Man....... those tutorials are just perfect. Probably the best tutorials I have ever follow on the internet.
    Thousands thanks

  • @vtv4373
    @vtv4373 3 роки тому +2

    As a JS dev, I'm really happy that we can use map as well. Even the syntax are alike.

  • @KARTHIKRANA28
    @KARTHIKRANA28 4 роки тому +6

    Amazingly taught... love your series man !! Please never stop i will watch em all..

  • @milosstojanovic9355
    @milosstojanovic9355 5 років тому +19

    Third quote is by Reymond Reddington from The Blacklist. Bonus points for me, i hope. :D

    • @NetNinja
      @NetNinja  5 років тому +15

      Haha - 5 Ninja points!

    • @TemphinFD
      @TemphinFD 3 роки тому

      bro season 9s dropping soon

  • @wabilemotswasele5608
    @wabilemotswasele5608 4 роки тому +2

    This is awesome. I have been using Dart for while and watching this tutorial I have a learnt a few useful techniques I can apply for both server backend and web frontent development. Thank you.

  • @2chotti
    @2chotti Рік тому

    Thank you for explaining in a simple way

  • @MarmureanuWeb
    @MarmureanuWeb 4 роки тому +2

    So simple when you explain! Awesome!

  • @adamoceallaigh2267
    @adamoceallaigh2267 4 роки тому +4

    Wassup man, another epic video series by the legit goat of this stuff. I legit ha no clue about flutter today had heard all the hype and will end up able to code an app pretty easily after this playlist, it actually strikes me so much how similar it is to HTML and JS really and then flexbox is thrown in for good measure it's an awesome framework but as always your explanations are top-notch. Cheers 👌🍻

    • @NetNinja
      @NetNinja  4 роки тому +2

      Glad you enjoyed it! :)

  • @dhphat12
    @dhphat12 3 роки тому

    Your voice is great, your lessons is great and you really help me into this course. Thank you so much, I will finish this course to the final video.

  • @sahilyadav998
    @sahilyadav998 3 роки тому +1

    All I have is Thankyou for now. Love your videos and your teaching skills. You earned a subscriber. Also if I end up making an app for a client some amount is going towards your patreon.

  • @danielalbert4077
    @danielalbert4077 5 років тому +3

    Always awesome all the way from react, Vue and to this..never let done!!

  • @siddharthdeepakbhaipanjwan722
    @siddharthdeepakbhaipanjwan722 4 роки тому

    man you are truely amazing i would like to express my gratitude for this series by clicking on the ads and will try to increase your revenue

  • @DACSBINITSHRESTHA
    @DACSBINITSHRESTHA 3 роки тому +4

    hello sir! Big Fan! I am stuck in this part of code.
    where quotes.map has red line error. the line quotes is underlined red. Please help me.
    just a beginner and i am getting addicted of your teaching.
    children: quotes.map((quote) {
    return Text(quote);
    }).toList()
    the line quotes is underlined red. I haved checked possibilites of mistakes and check whether i not defined quotes but yes! code are same exact of yours.

    • @shubhammankar6047
      @shubhammankar6047 2 роки тому +2

      body: Column(
      children: [...Quotes.map((e) =>
      Text(e)
      )
      ],
      ),

  • @khmiri
    @khmiri 4 роки тому

    Wow maaaan, you deserve an Oscar award actually, i have never found a tutorial like this, THIS SH**** IS EPIC!!!

  • @amerrashed6287
    @amerrashed6287 4 роки тому +3

    Amazing skills of simplifying things!! Keep going :)

  • @SauravMallik145
    @SauravMallik145 4 роки тому

    I never understood map() before watching this video, thanks buddy..

  • @muhmmadusmananwar2037
    @muhmmadusmananwar2037 2 роки тому

    Thank You Sir You are Really a Pro NINJA I want to become Ninja like You hope one day I will IA. Much Love and respect From Pakistan

  • @_M.Y17
    @_M.Y17 Місяць тому

    thank you. you are the best teacher

  • @quamarhafid5474
    @quamarhafid5474 2 роки тому +3

    Hello i had this error """ The element type 'List' can't be assigned to the list type 'Widget'.dartlist_element_type_not_assignable"""
    i had squarebrackets that affected my code ===> children: [ quotes.map ] , I want to Keep those brackets
    Meaning you can not wrap a list in a list
    Solution :
    you can use a separator which is ===> ...
    so the code will be :
    children: [
    ...quotes.map((e) => Text(e)).toList(),
    ],

  • @behroozbk
    @behroozbk 3 роки тому +1

    Shaun, you are the best! do you have a plan to publish a complete course for Flutter App development in Udemy or somewhere ?

    • @NetNinja
      @NetNinja  3 роки тому +2

      I am thinking about this, but it will probably be later in the year around Autumn if I do.

  • @alexyan7245
    @alexyan7245 3 роки тому +2

    your explaining is amazing :D ,, very easy to understand even for the complex part.. absolutely subsribe for sure

    • @NetNinja
      @NetNinja  3 роки тому +1

      Awesome, thank you! 😃

  • @value_investing_indonesia
    @value_investing_indonesia 4 роки тому +2

    so... Map essentially the same as foreach? or am i getting it wrong

  • @angelosorte1
    @angelosorte1 3 роки тому

    This course is simply amazing..........

  • @MeineFresse10
    @MeineFresse10 3 роки тому +1

    Perfect tutorial, thanks a lot!

  • @ahmedyousif4782
    @ahmedyousif4782 4 місяці тому

    if you are facing the error:
    The constructor being called isn't a const constructor.
    Try removing 'const' from the constructor invocation.
    just remove the const before Scaffold, it is written automatically by the code editor

  • @DeeJayFuego
    @DeeJayFuego 4 роки тому +1

    How do I become a member of the net ninja community, also when I save after putting in the map function I dont get the same orientation for the quotes, mine a one after the next and yours are in paragraph style one below the next

  • @thekrasa1970
    @thekrasa1970 4 роки тому

    So basically a for loop. Pretty cool!

  • @mongkulkh2318
    @mongkulkh2318 4 роки тому

    The Best 35 Videos on Flutter (:

  • @techchak9916
    @techchak9916 5 років тому +4

    you are awesome ninja!!!

  • @chenmarkson7413
    @chenmarkson7413 8 місяців тому

    Some quotes to add to your list:
    "You get in life what you have the courage to ask for.",
    "People do not decide their futures. They decide their habits and their habits decide their futures.",
    "Every action you take is a vote for the type of person you wish to become.",
    "Life isn't about finding yourself. Life is about creating yourself.",
    "The moment where you live right now is where everything happens."

  • @ghosttech5068
    @ghosttech5068 3 роки тому

    thank you so much for your effort mr ninja

  • @rishidiwute3604
    @rishidiwute3604 Рік тому

    FROM api.flutter
    map method
    Iterable map(
    T toElement(
    E e
    )
    )
    The current elements of this iterable modified by toElement.
    Returns a new lazy Iterable with elements that are created by calling toElement on each element of this Iterable in iteration order.
    The returned iterable is lazy, so it won't iterate the elements of this iterable until it is itself iterated, and then it will apply toElement to create one element at a time. The converted elements are not cached. Iterating multiple times over the returned Iterable will invoke the supplied toElement function once per element for on each iteration.
    Methods on the returned iterable are allowed to omit calling toElement on any element where the result isn't needed. For example, elementAt may call toElement only once.
    Equivalent to:
    Iterable map(T toElement(E e)) sync* {
    for (var value in this) {
    yield toElement(value);
    }
    }
    Example:
    var products = jsonDecode('''
    [
    {"name": "Screwdriver", "price": 42.00},
    {"name": "Wingnut", "price": 0.50}
    ]
    ''');
    var values = products.map((product) => product['price'] as double);
    var totalPrice = values.fold(0.0, (a, b) => a + b); // 42.5.
    Implementation
    Iterable map(T toElement(E e)) => MappedIterable(this, toElement);

  • @SohanTamang
    @SohanTamang 4 роки тому

    Best Tutorial Ever In UA-cam

  • @copeboys6659
    @copeboys6659 2 роки тому +2

    The argument type 'Iterable' can't be assigned to the parameter type 'List'. this error when i use map function.

    • @CodewithUmar
      @CodewithUmar 2 роки тому +2

      children: mylist.map((e) => Text(e),)).toList(),

    • @Samuel-ns5jb
      @Samuel-ns5jb 2 роки тому +2

      You have to add the toList() method like the answer above.

  • @rubenramirez7655
    @rubenramirez7655 4 роки тому +2

    Do you have a Udemy project? I would like to buy it, or just donate.

  • @ashimagoyal2811
    @ashimagoyal2811 2 роки тому

    When i added the list of quotes in the first class which extends Stateful widget, then the program wasn't working. But why?

  • @gabrielbarberini
    @gabrielbarberini Рік тому

    A strange thing I noticed: when using lambda it seems hot-reload sometimes fails to print the quotes, then when I reload it again it works.

  • @invideo1115
    @invideo1115 3 роки тому

    If we want to take first sentence from list...... What should we do????????

  • @denizaksoy9580
    @denizaksoy9580 4 роки тому

    We can understand from you that why UK run the World, he is great!

  • @hussainsalih3520
    @hussainsalih3520 4 роки тому

    Amazing you deserve 10M subscribers 😍😍😍

  • @Midexigner
    @Midexigner 5 років тому +2

    awesome sir

  • @katanaut
    @katanaut 3 роки тому

    Doesn’t .map function return a List object itself as in JavaScript?

  • @_M.Y17
    @_M.Y17 Місяць тому

    so map is basicly a function that when using in list, it cycles through all items in list and for each item of the list it's gonna perform a function

  • @beshg2298
    @beshg2298 3 роки тому

    @8:31 shouldn't it be Text('$quote')?

  • @tobiasschumacher6762
    @tobiasschumacher6762 3 роки тому

    Your videos are the best !

  • @wevertonsantiago4305
    @wevertonsantiago4305 3 роки тому

    Thanks so much! I did exactly like video, all very well! New subs here. 😁

    • @NetNinja
      @NetNinja  3 роки тому

      Awesome! Thank you!

  • @israkhan655
    @israkhan655 2 роки тому

    Thank you for sharing the video

    • @NetNinja
      @NetNinja  2 роки тому

      No problem Isra! Thanks for watching :)

  • @immanueldiaz5710
    @immanueldiaz5710 3 роки тому

    can we put a list inside a row?

  • @TechFriendly
    @TechFriendly 3 роки тому

    Amazing tutorial.

  • @hyperborean72
    @hyperborean72 Рік тому

    brilliant tutorial

  • @sumit180288
    @sumit180288 3 роки тому +1

    You are really addictive !!

  • @sachinminz90
    @sachinminz90 3 роки тому

    Can we do the same for SliverList in place of Column?

  • @boogerman2214
    @boogerman2214 3 роки тому

    This is the hardest one to understand

  • @manishs6479
    @manishs6479 3 роки тому

    Hey, I'd really appreciate it if someone could help me out with this/point me in the right direction. Say I want to create a list of widgets that references data from two different lists. How would I do that? It seems the map function is only good for mapping elements from one list onto one list of widgets.

  • @aligatortree
    @aligatortree 3 роки тому

    another great one mate

  • @solomon5050
    @solomon5050 3 роки тому

    why can't we use "forEach' in place of map?

  • @fma3852
    @fma3852 4 роки тому +1

    keep up the good work!

  • @constantindiac7804
    @constantindiac7804 4 роки тому

    What if i want different widgets, not just Text

  • @MFDElk
    @MFDElk 4 роки тому

    Love these tutorials. :D

  • @DanaKurdi
    @DanaKurdi 4 роки тому

    Thank You !

  • @antoniofuller2331
    @antoniofuller2331 4 місяці тому

    Took a while to complete this video using Git

  • @testcode9589
    @testcode9589 4 роки тому

    Thank you so much

  • @aessi2746
    @aessi2746 4 роки тому

    i am facing a issue here i cant get the list by just saving it or by fast reloading it whenever i change some thing in the list i need to rebuild the app and yes i have my scaffold in the build(){---} anyone knows what could be the issue

    • @aessi2746
      @aessi2746 4 роки тому

      i have also tried using the Github code and the output is the same i always need to rebuild to get the Updated list

  • @brice3002
    @brice3002 4 роки тому

    man you are the best 👌🏾

  • @mohamedmaher6398
    @mohamedmaher6398 3 роки тому

    what a video i love you man

  • @ifclause4798
    @ifclause4798 4 роки тому

    Isn't "The truth is rarely pure and never simple" Oscar Wilde too? 'The Importance of being Earnest', Act 1, Algernon

  • @ahmedabed6652
    @ahmedabed6652 3 роки тому +1

    amazing mate

  • @prenom_nom
    @prenom_nom 4 роки тому

    What would I do without you !

  • @itsmelodiouskeys
    @itsmelodiouskeys 3 роки тому +1

    Rather than deleting test file u could have simply rename MyApp() to QuoteList () lol

  • @YousefAboAnNour
    @YousefAboAnNour 2 роки тому

    Thaaanks

  • @madushanka
    @madushanka 3 роки тому +1

    Add 3 dots '...' before Quotes.map( ) function to work properly!
    ...quotes.map((quote){
    return Text (quote);
    }).toList( ),

    • @TemphinFD
      @TemphinFD 3 роки тому

      no?

    • @shubhammankar6047
      @shubhammankar6047 2 роки тому

      body: Column(
      children: [...Quotes.map((e) =>
      Text(e)

      )
      ],
      ),
      thanks!!

  • @RadjiMubarakElMobizy
    @RadjiMubarakElMobizy 2 роки тому

    hi am getting error when i run flutter doctor

  • @jailohana9030
    @jailohana9030 3 роки тому +1

    The people who have disliked his videos are our college Professors

  • @94kannan
    @94kannan 4 роки тому

    Could someone here explain me in simple words... how the map works here...
    children: quotes.map((quote) => Text(quote).toList(),
    Thanks in advance....

    • @hemantchaurasia4087
      @hemantchaurasia4087 4 роки тому +1

      i am not completely sure but this is probably a syntax of dart in which you can represent a function that just returns something with this syntax.

  • @tuananhdo1870
    @tuananhdo1870 2 роки тому

    7:08 map

  • @santoshisabat2505
    @santoshisabat2505 4 роки тому

    perfonalist!

  • @yacine_re4257
    @yacine_re4257 4 роки тому

    like before start the video for the best

  • @shwanagha230
    @shwanagha230 4 роки тому +1

    am I the only one lost in here? I watched this video twice but I'm a little bit lost in map function... thanks any way a GOD bless u

  • @drusttaib607
    @drusttaib607 Рік тому +1

    thanks for the video, but this is the ugliest way to use loops. as a programmer I like using for loops

    • @xzatech
      @xzatech 7 місяців тому

      I agree I love for loops - How would you write that code?

  • @yahyafati
    @yahyafati 3 роки тому

    The second one seems like something Jeremy Clarkson will say

  • @heavenlife5619
    @heavenlife5619 3 роки тому +1

    children: quotes.map((quote) => Text(quote)).toList()
    Why don't we use "quotes" in the map, our List name is "quotes" not "quote", So why we use "quote" in the map ???

    • @TemphinFD
      @TemphinFD 3 роки тому

      Im pretty sure its because you are creating a new tag or whatever which is quote, and then referencing it

  • @ItsMorze
    @ItsMorze 3 роки тому

    love the Oscar quotes

  • @wamwam5410
    @wamwam5410 3 роки тому

    "We have a preview now which is just a black screen of doom" XD

  • @tabili3830
    @tabili3830 4 роки тому

    I don't get it why would someone dislike this video

  • @oskargajewski5904
    @oskargajewski5904 2 роки тому

    children: [for (var i in quotes) Text(i)] i think this is easier to remember :P

  • @jw4659
    @jw4659 4 роки тому +6

    I'm tired of Grey.

  • @lyubovkorovina8238
    @lyubovkorovina8238 4 роки тому

    Thank you for your hard work!

  • @MO-er7xp
    @MO-er7xp 4 роки тому

    thank you so much