toListN<T> static method

List<T>? toListN<T>(
  1. dynamic d
)

Converts a dynamic value to a nullable list.

d - The dynamic value to be converted. Returns a list if the conversion is successful, otherwise null.

Implementation

static List<T>? toListN<T>(dynamic d) {
  return d is List<T> ? d : null;
}