“Flutter Concat listas” Respostas de código

Flutter Concat listas

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];
Brave Booby

Flutter Concat listas

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];
Brave Booby

Respostas semelhantes a “Flutter Concat listas”

Perguntas semelhantes a “Flutter Concat listas”

Mais respostas relacionadas para “Flutter Concat listas” em Dart

Procure respostas de código populares por idioma

Procurar outros idiomas de código