parseListIntToEnum<T> static method

List<T> parseListIntToEnum<T>(
  1. List<int> in_list,
  2. T? toEnum(
    1. int item
    )
)

Implementation

static List<T> parseListIntToEnum<T>(
  List<int> in_list,
  T? Function(int item) toEnum,
) {
  List<T> ids = [];
  for (int i = 0; i < in_list.length; ++i) {
    final item = toEnum.call(in_list[i]);
    if (null != item) {
      ids.add(item);
    }
  }
  return ids;
}