toList<T> static method
Converts a dynamic value to a non-nullable list.
d
- The dynamic value to be converted.
def
- The default list value if conversion fails.
Returns a list.
Implementation
static List<T> toList<T>(dynamic d, List<T> def) {
return toListN(d) ?? def;
}