Skip to content

Commit ff5b47a

Browse files
justinmckorca0220
authored andcommitted
NavigatorPopScope examples no longer use deprecated onPop. (flutter#174291)
I just noticed that these example are using a deprecated member.
1 parent a9714d2 commit ff5b47a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/api/lib/widgets/navigator_pop_handler/navigator_pop_handler.0.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ class _NestedNavigatorsPageState extends State<_NestedNavigatorsPage> {
8484

8585
@override
8686
Widget build(BuildContext context) {
87-
return NavigatorPopHandler(
88-
onPop: () {
87+
return NavigatorPopHandler<void>(
88+
onPopWithResult: (void result) {
8989
_nestedNavigatorKey.currentState!.maybePop();
9090
},
9191
child: Navigator(

examples/api/lib/widgets/navigator_pop_handler/navigator_pop_handler.1.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ class _BottomNavTabState extends State<_BottomNavTab> {
192192

193193
@override
194194
Widget build(BuildContext context) {
195-
return NavigatorPopHandler(
196-
onPop: () {
195+
return NavigatorPopHandler<void>(
196+
onPopWithResult: (void result) {
197197
_navigatorKey.currentState?.maybePop();
198198
},
199199
child: Navigator(

0 commit comments

Comments
 (0)