Search code snippets, questions, articles...

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;
//-> 3
Was this helpful?
Programming Feeds
Learn something new everyday on Devsheet