Skip to content

Commit 1970398

Browse files
committed
Nav.pop - Breaking Change
1 parent e314fc9 commit 1970398

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/utils/nav.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,9 @@ Future push(BuildContext context, Widget page, {bool replace = false}) {
1515
}
1616

1717
bool pop<T extends Object>(BuildContext context, [ T result ]) {
18-
return Navigator.pop(context);
18+
if(Navigator.canPop(context)) {
19+
Navigator.pop(context);
20+
return true;
21+
}
22+
return false;
1923
}

pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ packages:
309309
name: test_api
310310
url: "https://pub.dartlang.org"
311311
source: hosted
312-
version: "0.2.11"
312+
version: "0.2.15"
313313
typed_data:
314314
dependency: transitive
315315
description:

0 commit comments

Comments
 (0)