Skip to content

Commit

Permalink
add new observer
Browse files Browse the repository at this point in the history
  • Loading branch information
NatashaZettler committed Dec 4, 2023
1 parent 4eb750c commit d0ce625
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/nuvigator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ class NuvigatorState<T extends INuRouter> extends NavigatorState
return widget.inheritableObservers;
}

void addObserver(NavigatorObserver observer) {
widget.observers.add(observer);
}

@override
void initState() {
parent = Nuvigator.of(context, nullOk: true);
Expand Down

0 comments on commit d0ce625

Please sign in to comment.