getPriorityByNodeName function
Get the priority of a node based on its name. Values starting with upper- case letters should be prioritized, values starting with underscores should be below everything else.
Implementation
int getPriorityByNodeName(String name) {
if (RegExp(r'^[A-Z]').hasMatch(name)) {
return 60;
}
if (name.startsWith("_")) {
return 40;
}
return 50;
}