isListOfNum function
Returns true
if list
elements are all of type num.
Implementation
bool isListOfNum(Iterable? list) {
if (list == null) return false;
if (list is List<num>) return true;
if (list.isEmpty) return false;
if (listNotMatchesAll(list, (e) => (e is num))) return false;
return true;
}