Closed
Description
Dart has a nice declarative syntax for creating new lists and maps (and eventually probably sets) from a series of elements:
var list = [1, 2, 3];
var map {key: value};
This works well when building a collection out of individual elements. But if you want to insert the contents of an existing collection, you are forced to use an imperative, mutating API:
var args = testArgs.toList()
..add('--packages=${PackageMap.globalPackagesPath}')
..add('-rexpanded')
..addAll(filePaths);