Converts a comma-separated string into a List
Example:
print('1,2,3'.toIntList); // Output: [1, 2, 3] print('1,a,3'.toIntList); // Output: [1, 3]
List<int> get toIntList => split(',').map((s) => int.tryParse(s)).where((i) => i != null).cast<int>().toList();