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?
Similar Posts
- Dart Collections - Create a List or Array
- Dart Program to add Single or Multiple Items to a List
- Dart Program to update or replace List items or values
- Dart program for condition based item removal from a list
- Dart Program to remove the last element from a List
- Remove List item or element using its index in Dart
- Dart Program to remove multiple items from a List at once