Dart Programming - List.length Method


Advertisements

Returns the size of the list.

Syntax

List.length 

Example

void main() { 
   var lst = new List(); 
   lst.add(12); 
   lst.add(13); 
   print("The length of the list is : ${lst.length}"); 
}   

It will produce the following output −.

The length of the list is : 2  
dart_programming_lists.htm
Advertisements