fromList<T> static method

() fromList<T>(
  1. List<T> list
)

List constructor.

Implementation

static () fromList<T>(List<T> list) {
  if (list.isNotEmpty) {
    throw ArgumentError.value(
        list, 'list', 'Expected list of length 0, but got ${list.length}');
  }
  return ();
}