Dart Collections: Arrays as List: Growable List. Dart for Flutter #11.2

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024
  • Access 7000+ courses for 15 days FREE: pluralsight.px...
    Dart beginners tutorial. Explore what is Growable List where the length of the List is dynamic and changes in runtime. Dart supports various Collection types such as Set, Map, HashSet, HashMap, Queue, LinkedList. Let us explore each one of them in this section.
    Next Video : • Dart Collections: Set ...
    Previous Video : • Dart Collections: Arra...
    Code Files: bit.ly/2NIpMeg .
    .
    Please donate and support my work
    (If you think my free tutorials are better than paid ones :)
    - Patreon: bit.ly/patreon...
    - Paypal/Payoneer: sriyank123@gmail.com
    - UPI (only for India): smartherd@okaxis
    :: If you want to develop a website or a mobile app, email me your requirement at sriyank.siddhartha@gmail.com :: Free demos provided beforehand ::
    - Access my premium courses: bit.ly/sriyank...
    Free Programming courses:
    - Ruby Programming: bit.ly/smyt-r
    - Dart Programming: bit.ly/smyt-d
    - Kotlin Programming: bit.ly/smyt-k
    - Java Programming: bit.ly/smyt-j
    - Kotlin Coroutines: bit.ly/smyt-coru
    Free Flutter course:
    - Flutter App Development: bit.ly/2Rg7EFR
    Free Android courses:
    - Android using Kotlin: bit.ly/smyt-ka
    - Android using Java: bit.ly/smyt-ja
    - Android Material Design: bit.ly/2SMJqU6
    - Android Jetpack Architecture: bit.ly/yt-j
    - Android Multiple Screen Support: bit.ly/smyt-mss
    - Android Retrofit: bit.ly/2Ee6GHn
    More free programming courses:
    - bit.ly/smy-list
    Check out my website:
    - bit.ly/smartherd
    Let's get in touch! [Sriyank Siddhartha]
    LinkedIn: bit.ly/sriyank...
    Facebook: bit.ly/smarthe...
    Instagram: bit.ly/sriyank...
    Twitter: bit.ly/sriyank...
    Github: bit.ly/smarthe...
    --- Thank you for your love and support ---

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

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

    instead of this-> List numbersList = List();
    use this:
    List numbersList = [];

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

    A lot of topics in this course are outdated. Hopefully you will create another course that cover also the new versions of dart.

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

    I am from Nepal and your tutorials are the best !

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

      Me too

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

    Do you know there is only one country called Nepal? Any all other things are in Nepal.

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

    Hi!, how can i create a Growable List with the news Dart versions and flutter?,because they have turned on the Null-Safety ,andwhen you try crate a empty List() it says that "List() can't be created when Null Safety is turned on ,because it will return null"

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

    Good explanation 👍🏻 thanks you !
    From Cambodia

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

    Can you tell me how to get total of int in the list that contains strings and integer.
    Example
    [car insurance 1400$, phone 800$]
    How can get the results = 2200$

  • @MUHAMMADSHAKEEL-mb4dt
    @MUHAMMADSHAKEEL-mb4dt 3 ปีที่แล้ว

    bro i want to pass list of data from package to an other.how can i do that?

  • @JK92007
    @JK92007 6 ปีที่แล้ว

    Nice....👌..Is there no tuple in dart bro...?

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

    please if we want to add a list to a particular position just like removeAt[3], how do we go about it.

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

      Hi,
      Hope you have already found the solution, if not check insertAll() in the dart documentation.
      api.dart.dev/stable/2.8.1/dart-core/List-class.html
      You can use it as
      void main()
      {
      List listOne = [0,1,2,3,4,5,6];
      List listTwo = [-1,-2,-3];
      listOne.insertAll(3, listTwo);
      listOne.forEach((element) => print(element));
      }
      ===================================================================
      output:
      0
      1
      2
      -1
      -2
      -3
      3
      4
      5
      6
      ===================================================================
      Hope this helps.
      Stay safe.

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

      or you can use the insert method exactly like in python:
      GrowableList.insert(, );

  • @aayushsaini9363
    @aayushsaini9363 6 ปีที่แล้ว

    How it is different from array list?

  • @chill7760
    @chill7760 5 ปีที่แล้ว

    How to convert integers to lists?
    Example:
    num myNumber = 123221

  • @krishnakumarramachandran5888
    @krishnakumarramachandran5888 5 ปีที่แล้ว

    Thanks for this video Sir

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

    how to take input to a array from the user?
    List list = [
    for (int i = 0; i < s; i++)
    [for (int j = 0; j < s; j++) stdin.readLineSync()]
    ];
    I am a beginner in dart so I searched in the google and found this type of method .But I don't understand how this method is working or is this the proper way to do this .if anyone know the answer please give reply to this comment.

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

      To take the input from user
      import 'dart:io';
      void main(){
      print("enter the numbers");
      List mylist=[];
      for(int i=1;i

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

    love from Pakistan

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

    Thanks. Ghana

  • @terryfung8641
    @terryfung8641 5 ปีที่แล้ว

    Cool, .it's helpful!thx

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

    Why you always say "perfect"?