/// List utilities /// /// @author Pierre HUBERT /// Transform a list of dynamic thins into something a list of ints List listToIntList(List srcList) { List list = List(); srcList.forEach((e) { list.add(int.parse(e)); }); return list; } /// Find the list of missing elements of a [testList] from a [srcList] List findMissingFromList(List srcList, List testList) { List dest = List(); testList.forEach((f) { if (!srcList.contains(f) && !dest.contains(f)) dest.add(f); }); return dest; } /// Find the list of missing elements of a [testList] from a [srcList] Set findMissingFromSet(Set srcList, Set testList) { Set dest = Set(); testList.forEach((f) { if (!srcList.contains(f)) dest.add(f); }); return dest; }