reorder method
Implementation
void reorder(
bool Function() condition, void Function() one, void Function() two) {
if (condition()) {
one();
two();
} else {
two();
one();
}
}
void reorder(
bool Function() condition, void Function() one, void Function() two) {
if (condition()) {
one();
two();
} else {
two();
one();
}
}