📅  最后修改于: 2022-03-11 14:58:40.503000             🧑  作者: Mango
List numbers = [1, 2, 3, 4, 5,];
//Check if index 7 is valid
if (numbers.asMap().containsKey(7)) {
print('Exists');
} else {
print('Doesn\'t exist');
}