Commit dc9bd7ff authored by Yacumima's avatar Yacumima

protect null pointer exception

parent ae2c03fe
...@@ -149,13 +149,13 @@ class BoostContainerState extends NavigatorState { ...@@ -149,13 +149,13 @@ class BoostContainerState extends NavigatorState {
@override @override
void didUpdateWidget(Navigator oldWidget) { void didUpdateWidget(Navigator oldWidget) {
super.didUpdateWidget(oldWidget); super.didUpdateWidget(oldWidget);
findContainerNavigatorObserver(oldWidget).removeBoostNavigatorObserver( findContainerNavigatorObserver(oldWidget)?.removeBoostNavigatorObserver(
FlutterBoost.containerManager.navigatorObserver); FlutterBoost.containerManager.navigatorObserver);
} }
@override @override
void dispose() { void dispose() {
findContainerNavigatorObserver(widget).removeBoostNavigatorObserver( findContainerNavigatorObserver(widget)?.removeBoostNavigatorObserver(
FlutterBoost.containerManager.navigatorObserver); FlutterBoost.containerManager.navigatorObserver);
super.dispose(); super.dispose();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment