removeRoute<T> method
Implementation
void removeRoute<T>(SintPage<T> route) {
for (final page in [route, ..._flattenPage(route)]) {
// Children may share the same relative Page key under different
// parents. Their fully qualified name identifies the right branch.
final index = routes.indexWhere(
(candidate) => candidate.name == page.name && candidate.key == page.key,
);
if (index >= 0) routes.removeAt(index);
}
}