0

so I found that the List type has two factory constructors that look the same to me.

  List<int> list1 = [1,2,3,4,5];
  print(List.of(list1)); // [1,2,3,4,5]
  print(List.from(list1)); // [1,2,3,4,5]

they do the same thing, which is copying a generating a List from another List's copy, right? Or is there any difference between both them?

Gwhyyy
  • 7,554
  • 3
  • 8
  • 35

0 Answers0