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