I\'m trying to sort a list by alphabetical order and tried porting something i had in javascript to flutter. But it gives me an exception on String that it does not have the
late answer, i had a similar situation and here is how i solved it
String a = 'towNnpBiDHRehMh4FhYAYShVFr62';
String b = 'Yjeq9bA0spdZGmqlbr4J663LyvC3';
String c = "RdeQo32uUwX3ftBeGm0nFChkzE52";
//if you try to sort the strings without converting them toLowercase ir uppercase you will get different results.
List _myBranchListName = [
a.toLowerCase(),
b.toLowerCase(),
c.toLowerCase(),
];
_myBranchListName.sort();
//if you want to add to strings from the result
var userId = "${_myBranchListName[0]}" + "${_myBranchListName[1]}";
print(userId);
print(_myBranchListName);