list.generate flutter code example
Example 1: flutter list.generate
final items = List.generate(10000, (i) => "Item $i");
Example 2: dart list generate
new List.generate(3, (int index) => index * index); // [0, 1, 4]
final items = List.generate(10000, (i) => "Item $i");
new List.generate(3, (int index) => index * index); // [0, 1, 4]