wrongType<T> function Null safety

T wrongType<T>(
  1. String name,
  2. dynamic value,
  3. List<Type> accepted
)

Implementation

T wrongType<T>(String name, value, List<Type> accepted) =>
    throw ArgumentError.value(value, name,
        "Wrong type (${value?.runtimeType}) - expected one of $accepted");