I want to replace an URL String in Dart with another String. Example:
if (url == "http://www.example.com/1") {
home = "example";
} else if (url == "http://www.example.com/1") {
home = "another example";
}
Isn't there a better way with less code and maybe faster? I'd have to do this over 60 times..
Aucun commentaire:
Enregistrer un commentaire