Reputation: 639
Is there a way in dart to count and get the number of items in a List? So, when you have a list with five words in it, it would output you the number five, when the method is called?
Upvotes: 0
Views: 3357
Reputation: 428
You just take your list variable and do .length on it to return how long it is.
https://api.dart.dev/stable/2.8.2/dart-core/List-class.html
Upvotes: 1