Collections in Dart - Learn About Lists, Maps, Sets and the Collection Package in Dart

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.ย. 2024

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

  • @SaadullahKhan-og3eb
    @SaadullahKhan-og3eb 2 หลายเดือนก่อน +1

    I have watched so many courses but this course is a super game changer. Thank you sir for providing us great course

  • @nickcfc1
    @nickcfc1 10 หลายเดือนก่อน +1

    Congratulations, this is a course that truly teaches and not empty tutorials, I'm learning a lot.

  • @appdevelopment4741
    @appdevelopment4741 ปีที่แล้ว +7

    With every dart lecture you are winning my heart. Thank you Sir for making videos in great details❤❤❤

  • @learnandearn1851
    @learnandearn1851 ปีที่แล้ว +9

    This is life changing course. Thank you sir for providing us great content🤗.

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

      It's my pleasure 🤗

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

    Great tutorial for Dart collections. I'm at the half of the video and already loving it - the details, examples, straight to the point approach,...

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

    Was able to complete this course today. I must say, I have learned a whole new thing about collections. This is really an eye-opener course. Thank you so much Mr. Vandad.

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

    if this is crash course then i can't imagine the length of full course.... thank you much sir such a great video.

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

    High quality as always!! Thanks!!

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

    Sir, you are a legend!

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

      Wow, thanks! and you too 🚀

  • @StudentPro-io8vi
    @StudentPro-io8vi ปีที่แล้ว

    Thank you Vandad!

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

    @VandadNP when you add the getter to protect the _siblings list in the Person class, returning UnmodifiableListView, doesn't it just stop the outside from modifying the list when accessing via .siblings? It can still modify the actual list in _siblings just as before? It seems it's still as vulnerable to edits from the outside as before. Or am I missing something?

  • @Nirvairsingh-vv9ly
    @Nirvairsingh-vv9ly ปีที่แล้ว +1

    sir you are Great

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

      Thank you and you too 😊

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

    thanks

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

    Keep going bro

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

    Wish I could like this video more than once

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

    I fuckin love you man ! Thanks

  • @user-xo6xt3nh8d
    @user-xo6xt3nh8d 11 หลายเดือนก่อน

    print('---add to dictionary----');
    const food = {
    'name': 'hello',
    'age': 28,
    };
    final result = {...food}.addAll({'other': 9});
    print(result); //This expression has a type of 'void' so its value can't be used...why it gives me error although I followed the same code: at 1:44:00

  • @red.rocket
    @red.rocket ปีที่แล้ว +1

    The spread operator is great but what about more complicated things like lists of maps? How to copy those? Is the spread operator still usefil?

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

      To deep copy a list of maps you can first map the list, and then for every map in the list, create a copy of it using Map.from(), like this => yourList.map((map) => Map.from(map)).toList();

    • @red.rocket
      @red.rocket ปีที่แล้ว

      ​ @VandadNP Thanks. So the spread operator has use in only simple things then. I'm learning Dart for a month and I was shocked that there are no option to pass a variable to a function by reference in order to modify the original object and when I've just come to terms with this fact I noticed (after searching for a bug in my code for several minutes) that lists and maps break out of the schema and they are not passed as copies but references. Unfortunately there's no deep copy option in the language so I had been using json.decode.json.encode(list)) to serialize and deep copy this way, but the map seems to be working more elegantly. Thanks again.

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

    How to show the error message on the right side within line???? All error and suggestion are on the bottom

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

    In 1:47:08 I fixed the code like this:
    void main(List args) {
    final string = 'abracadabra';
    var result = {
    for (final char in string.split('')) 'abc'.contains(char) ? null : char
    }..removeAll([null]);
    var result2 = result.toList();
    print(result2);
    }
    Unfortunatelly, I cound't find a way to apply the rest of chaining methods. It only applies removeAll, but not the rest. And it also forces me to create a "result2" variable, I coudn't even mutate the same "result" variable. I wonder if this is a bug from the dart language that should be corrected by the google team, or wether there is another way.

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

      I was able to get it to work this way:
      final string = 'abracadabra';
      var allExceptAbc = {
      for (final char in string.split('')) 'abc'.contains(char) ? null : char
      }.whereType().toSet();
      print(allExceptAbc);

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

      simply do this:
      final string = 'abracadabra';
      final allExceptAbc = {
      for (final char in string.split(''))
      if (!'abc'.contains(char)) char
      };
      print(allExceptAbc);

  • @d-apps2699
    @d-apps2699 ปีที่แล้ว

    One thing that I didn't understand was: When to use List and when to use Iterable?

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

    I want my bag of candies that I said yes too 😜

  • @edidiongbassey919
    @edidiongbassey919 11 หลายเดือนก่อน

    Mature dart tutorial

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

    first of all thank you for your work and I hope you lead a blessed life.
    I have a question on the codeActionOnSave,
    so i added the entries on json user setting but i get the error "end of the file expected when I place them outside {} of the default entries, but when I place them inside the default entries nothing happens. what did I do wrong and ty.
    "[dart]": {
    "editor.codeActionsOnSave": {
    "quickFix.add.required": true,
    "quickFix.add.required.multi": true,
    "quickFix.create.constructorForFinalFields": true,
    "quickFix.create.constructorForFinalFields.multi": true,
    "quickFix.remove.thisExpression:": true,
    "quickFix.remove.thisExpression.multi": true
    },
    "editor.formatOnSave": true,
    "editor.formatOnType": true
    }