how to compare strings in dart code example Example: compareTo dart strings data.sort((a, b) { return compareAsciiUpperCase(a.name, b.name); });