From d0ce625d2e6f2f7a17cda61ec3755ac94a1a1c41 Mon Sep 17 00:00:00 2001 From: NatashaZettler Date: Sun, 3 Dec 2023 21:48:25 -0300 Subject: [PATCH] add new observer --- lib/src/nuvigator.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/nuvigator.dart b/lib/src/nuvigator.dart index aaf3899..44e0764 100644 --- a/lib/src/nuvigator.dart +++ b/lib/src/nuvigator.dart @@ -184,6 +184,10 @@ class NuvigatorState extends NavigatorState return widget.inheritableObservers; } + void addObserver(NavigatorObserver observer) { + widget.observers.add(observer); + } + @override void initState() { parent = Nuvigator.of(context, nullOk: true);