flutter get list length code example
Example 1: how to find the length a list in dart
list.length //to check a length of list
Example 2: flutter count list
var comments = <Comment>[...];
var count = comments.where((c) => c.product_id == someProductId).toList().length;