Commit dc9bd7ff authored by Yacumima's avatar Yacumima

protect null pointer exception

parent ae2c03fe
......@@ -149,13 +149,13 @@ class BoostContainerState extends NavigatorState {
@override
void didUpdateWidget(Navigator oldWidget) {
super.didUpdateWidget(oldWidget);
findContainerNavigatorObserver(oldWidget).removeBoostNavigatorObserver(
findContainerNavigatorObserver(oldWidget)?.removeBoostNavigatorObserver(
FlutterBoost.containerManager.navigatorObserver);
}
@override
void dispose() {
findContainerNavigatorObserver(widget).removeBoostNavigatorObserver(
findContainerNavigatorObserver(widget)?.removeBoostNavigatorObserver(
FlutterBoost.containerManager.navigatorObserver);
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