getPropsList<T> function
Extracts a List value from props.
Returns an empty list if the value is not a List.
Implementation
List<T> getPropsList<T>(Map<String, dynamic> props, String key) {
final value = props[key];
if (value is List) {
return value.whereType<T>().toList();
}
return [];
}