Tuple1<T>.fromList constructor
Creates an tuple from a list source.
Implementation
factory Tuple1.fromList(List<dynamic> list, [bool trim = false]) {
if (list.isEmpty) {
throw ArgumentError.value(
'list', 'The given list has less than 1 element.');
}
if (!trim && list.length > 1) {
throw ArgumentError.value('list',
'The given list has more than 1 element. Use `trim: true` if you intended to ignore excess elements.');
}
return Tuple1(list[0] as T);
}