Tuple6<T1, T2, T3, T4, T5, T6>.fromList constructor Null safety

Tuple6<T1, T2, T3, T4, T5, T6>.fromList(
  1. List items
)

Create a new tuple value with the specified list items.

Implementation

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

  return Tuple6<T1, T2, T3, T4, T5, T6>(items[0] as T1, items[1] as T2,
      items[2] as T3, items[3] as T4, items[4] as T5, items[5] as T6);
}