Tuple4<T1, T2, T3, T4>.fromList constructor

Tuple4<T1, T2, T3, T4>.fromList(
  1. List items
)

Create a new tuple value with the specified list items.

Implementation

factory Tuple4.fromList(List items) {
  if (items.length != 4) {
    throw ArgumentError('items must have length 4');
  }

  return Tuple4<T1, T2, T3, T4>(
      items[0] as T1, items[1] as T2, items[2] as T3, items[3] as T4);
}