fromList<T> static method
List constructor.
Implementation
static Tuple2<T, T> fromList<T>(List<T> list) {
if (list.length != 2) {
throw ArgumentError.value(
list, 'list', 'Expected list of length 2, but got ${list.length}');
}
return Tuple2(list[0], list[1]);
}