Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter concat lists

var newList = [list1, list2, list3].expand((x) => x).toList()
As of Dart 2 you can now use +:

var newList = list1 + list2 + list3;
As of Dart 2.3 you can use the spread operator:

var newList = [...list1, ...list2, ...list3];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flutter #concat #lists
ADD COMMENT
Topic
Name
2+7 =