Tuple2<T1, T2>.fromList constructor
Tuple2<T1, T2>.fromList (
- List items
Create a new tuple value with the specified list items
.
Implementation
factory Tuple2.fromList(List items) {
switch (items.length) {
case 0:
return Tuple2.empty();
case 1:
return Tuple2(items.first as T1, null as T2);
default:
return Tuple2(items[0] as T1, items[1] as T2);
}
}