Вы можете разделить с помощью RegExp:
import 'dart:io';
void main() {
const input1 = '10, 9, 8, 6, 7, 2, 3, 4, 5, 1';
const input2 = '10 9 8 6 7 2 3 4 5 1';
const input3 = '10,9,8,6,7,2,3,4,5,1';
final regexp = RegExp(r'(?: |, |,)');
print(input1.split(regexp)); // [10, 9, 8, 6, 7, 2, 3, 4, 5, 1]
print(input2.split(regexp)); // [10, 9, 8, 6, 7, 2, 3, 4, 5, 1]
print(input3.split(regexp)); // [10, 9, 8, 6, 7, 2, 3, 4, 5, 1]
print('Please enter line of numbers to sort:');
final input = stdin.readLineSync();
final listOfNumbers = input.split(regexp).map(int.parse).toList();
print('Here is your list of numbers:');
print(listOfNumbers);
}