list.generate in flutter code example
Example 1: generate list flutter
List<int>.generate(3, (int index) => index * index); // [0, 1, 4]
Example 2: dart list generate
new List<int>.generate(3, (int index) => index * index); // [0, 1, 4]
List<int>.generate(3, (int index) => index * index); // [0, 1, 4]
new List<int>.generate(3, (int index) => index * index); // [0, 1, 4]