toListOfInt static method

List<int> toListOfInt(
  1. dynamic d
)

Converts to not-nullable list of integers from dynamic

Implementation

static List<int> toListOfInt(dynamic d) {
  final jsonList = Convert.toListN(d);
  final List<int> result = [];
  if (jsonList != null) {
    jsonList.forEach((e) {
      final i = Convert.toIntN(e);
      if (i != null) {
        result.add(i);
      }
    });
  }
  return result;
}