вложенный список в DART
// You can either use List.filled or List.generate
//1) Using List.filled to creare 3x3 list
List l = List.filled(3, List.filled(3, 0));
print(l);
Output:
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]
//2) Using List.generate to create 4x4 list
List l = List.generate(4, (_) => List.generate(4, (_) => 0));
print(l);
Output:
[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
Powerful Polecat