void main() {
var names = ["kevin", "peter", "david", "anna", "nilpointer"];
print("Descending Order");
names.sort((i, j) => j.compareTo(i));
names.forEach((i) => {print(i)});
}
Output
Descending Order
peter
nilpointer
kevin
david
anna