• Courses
  • YouTube
  • Dev News
  • Technology
  • Blogs
  • Flutter Jobs
  • Contact
    • About Us
    • RegisterLogin
    Navoki
    • Courses
    • YouTube
    • Dev News
    • Technology
    • Blogs
    • Flutter Jobs
    • Contact
      • About Us
    • RegisterLogin

      List in Dart Programming language

      • Home
      • All courses
      • Dart Programming Language
      • List in Dart Programming language
      CoursesDart Programming LanguageDart TutorialList in Dart Programming language
      • List
        6
        • Lecture1.1
          Video- List in Dart
        • Lecture1.2
          What is a List in Dart?
        • Lecture1.3
          Declare a List in Dart
        • Lecture1.4
          Traverse a List in Dart
        • Lecture1.5
          Add and Remove items in List
        • Lecture1.6
          Useful functions in List

        What is a List in Dart?

        List is a part of a Collection in dart it is used to store multiple data or similar data types whether it can be in integer, boolean, or String or user-defined data type.

        Let me explain with an example. I am storing students roll number But it can store only 1 student’s  data

        int rollNo=31;

        Suppose I want to store roll numbers of all the students, we cannot create a number of variable names rollNo1,rollNo2 and so on.  So here I am going to use a List, List is used to store many values of similar data types. Here I can put all the students roll a number of any number of lengths.

        List<int> rollNoList=[31,34,36,40];

        The number of items in the list a dynamic nature which means you can add or remove elements at any point of execution. In example you can see there are 4 items but any programming languages always count it as 0-3 i.e the index of will be 0, not 1, but the length same- 4.

        If I want to access an element from the list I have to mention the list variable name with an index number, so to get 34 from the List the sentence will be:

         int rollNo=rollNoList[1];

         

        0
        Prev Video- List in Dart
        Next Declare a List in Dart

        DON’T MISS
        FLUTTER UPDATES

        Be the first to know when our blog is published.

        flutter-mobile-mockup

        Check your inbox or spam folder to confirm your subscription.

        Contact

        •   Navoki Technologies Pvt. Ltd.
          JMD Megapolis , Sector 48, Gurugram, Haryana 122018

        Company

        • About Us
        • Blogs
        • Contact
        • Privacy policy
        • Terms & Condition

        Useful Links

        • Courses
        • Youtube
        • Dev News

        Mobile

        Click and Get started in seconds

        "Navoki" is a registered trademark of Navoki.com ® 2020–2030 Navoki Technologies Pvt Ltd.

        • Terms & Condition

        Login with your site account

        Continue with Google

        By "Sign in” above to accept Navoki’s Terms of Service & Privacy Policy.

        Not a member yet? Register now

        Register a new account

        Continue with Google

        By "Sign Up” above to accept Navoki’s Terms of Service & Privacy Policy.

        Are you a member? Login now

        Modal title

        Message modal