check for empty route stack
This commit is contained in:
@@ -62,8 +62,13 @@ class CurrentTopRoute extends _$CurrentTopRoute {
|
|||||||
|
|
||||||
void update() {
|
void update() {
|
||||||
final config = router.routerDelegate.currentConfiguration;
|
final config = router.routerDelegate.currentConfiguration;
|
||||||
final match = config.last;
|
|
||||||
|
|
||||||
|
if (config.isEmpty) {
|
||||||
|
state = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final match = config.last;
|
||||||
state = match.route;
|
state = match.route;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user