Commit ddc22af1 authored by justin's avatar justin

修复按键回退

parent 3a7185d0
...@@ -185,7 +185,7 @@ class BoostContainerState extends NavigatorState { ...@@ -185,7 +185,7 @@ class BoostContainerState extends NavigatorState {
Future<bool> maybePop<T extends Object>([T result]) async { Future<bool> maybePop<T extends Object>([T result]) async {
if(routerHistory.isEmpty) if(routerHistory.isEmpty)
pop(result); pop(result);
final Route<T> route = routerHistory.last; final Route<T> route = routerHistory.last;
final RoutePopDisposition disposition = await route.willPop(); final RoutePopDisposition disposition = await route.willPop();
if (mounted) { if (mounted) {
...@@ -209,7 +209,7 @@ class BoostContainerState extends NavigatorState { ...@@ -209,7 +209,7 @@ class BoostContainerState extends NavigatorState {
@override @override
bool pop<T extends Object>([T result]) { bool pop<T extends Object>([T result]) {
Route removedRoute; Route removedRoute;
if (routerHistory.length > 1) { if (routerHistory.length >= 1) {
removedRoute = routerHistory.removeLast(); removedRoute = routerHistory.removeLast();
} }
......
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