dart

Get the length of list in Dart

To get the length of a List in the dart programming language, you can use List.length and this will return the total number of items in the list.

List fruits = ["Apple", "Orange", "Grapes"];
int len = fruits.length;
print(len);
//-> 3
Was this helpful?