From cf2b732c0fb036749ab92802ab8a1b4617320ef2 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Mon, 31 Oct 2016 12:33:01 -0700 Subject: [PATCH] Make popUntil docs more consistent with reality. (#6599) --- packages/flutter/lib/src/widgets/navigator.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/widgets/navigator.dart b/packages/flutter/lib/src/widgets/navigator.dart index 658489617f..69c0234f34 100644 --- a/packages/flutter/lib/src/widgets/navigator.dart +++ b/packages/flutter/lib/src/widgets/navigator.dart @@ -324,7 +324,8 @@ class Navigator extends StatefulWidget { return Navigator.of(context).pop(result); } - /// Calls [pop()] repeatedly until the predicate returns false. + /// Calls [pop()] repeatedly until the predicate returns true. + /// /// The predicate may be applied to the same route more than once if /// [Route.willHandlePopInternally] is true. static void popUntil(BuildContext context, RoutePredicate predicate) { @@ -616,6 +617,9 @@ class NavigatorState extends State with TickerProviderStateMixin { } /// Repeatedly calls [pop] until the given `predicate` returns true. + /// + /// The predicate may be applied to the same route more than once if + /// [Route.willHandlePopInternally] is true. void popUntil(RoutePredicate predicate) { while (!predicate(_history.last)) pop();