📅  最后修改于: 2022-03-11 14:55:05.088000             🧑  作者: Mango
List countries = [
"Nepal",
"Nepal",
"USA",
"Canada",
"Canada",
"China",
"Russia",
];
var seen = Set();
List uniquelist = countries.where((country) => seen.add(country)).toList();
print(uniquelist);
//output: [Nepal, USA, Canada, China, Russia]