CINXE.COM
onPopInvokedWithResult property - PopScope class - widgets library - Dart API
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no"> <meta name="description" content="API docs for the onPopInvokedWithResult property from the PopScope class, for the Dart programming language."> <title>onPopInvokedWithResult property - PopScope class - widgets library - Dart API</title> <!-- required because all the links are pseudo-absolute --> <base href="../../"> <link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet"> <link rel="stylesheet" href="static-assets/github.css?v1"> <link rel="stylesheet" href="static-assets/styles.css?v1"> <link rel="icon" href="static-assets/favicon.png?v1"> <!-- style overrides for dartdoc --> <style> @import 'https://fonts.googleapis.com/css?family=Roboto:500,400italic,300,400,100i'; @import 'https://fonts.googleapis.com/css?family=Google+Sans:500,400italic,300,400,100i'; @import 'https://fonts.googleapis.com/css?family=Open+Sans:500,400italic,300,400,100i'; @import 'https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Sharp|Material+Icons+Round'; </style> <link href="https://flutter.github.io/assets-for-api-docs/assets/cupertino/cupertino.css" rel="stylesheet" type="text/css"> <link href="../assets/overrides.css" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Sharp|Material+Icons+Round" rel="stylesheet"> <style> /* Rule for sizing the icon. */ .md-36 { font-size: 36px; } </style> <!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f) })(window,document,'script','dataLayer','GTM-ND4LWWZ');</script> <!-- End Google Tag Manager --> <!-- Cookie Banner --> <link rel="stylesheet" href="https://www.gstatic.com/glue/cookienotificationbar/cookienotificationbar.min.css"> <!-- End Cookie Banner --> <script async="" defer="" src="../assets/api_survey.js"></script> <!-- Styles and scripting for handling custom code snippets --> <link href="../assets/snippets.css" rel="stylesheet" type="text/css"> <script src="../assets/snippets.js"></script> <link rel="search" type="application/opensearchdescription+xml" title="Flutter API" href="/opensearch.xml"/> </head> <body data-base-href="../../" data-using-base-href="true" class="light-theme"> <div id="overlay-under-drawer"></div> <header id="title"> <span id="sidenav-left-toggle" class="material-symbols-outlined" role="button" tabindex="0">menu</span> <ol class="breadcrumbs gt-separated dark hidden-xs"> <li><a href="index.html">Flutter</a></li> <li><a href="widgets/widgets-library.html">widgets.dart</a></li> <li><a href="widgets/PopScope-class.html">PopScope<span class="signature"><<wbr><span class="type-parameter">T</span>></span></a></li> <li class="self-crumb">onPopInvokedWithResult property</li> </ol> <div class="self-name">onPopInvokedWithResult</div> <form class="search navbar-right" role="search"> <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search..."> </form> <div class="toggle" id="theme-button" title="Toggle brightness"> <label for="theme"> <input type="checkbox" id="theme" value="light-theme"> <span id="dark-theme-button" class="material-symbols-outlined"> dark_mode </span> <span id="light-theme-button" class="material-symbols-outlined"> light_mode </span> </label> </div> </header> <main> <div id="dartdoc-main-content" class="main-content" data-above-sidebar="widgets/PopScope-class-sidebar.html" data-below-sidebar=""> <div> <div id="external-links" class="btn-group"><a title="View source code" class="source-link" href="https://github.com/flutter/flutter/blob/main/packages/flutter/lib/src/widgets/pop_scope.dart#L116"><span class="material-symbols-outlined">description</span></a></div> <h1><span class="kind-property">onPopInvokedWithResult</span> property </h1></div> <section class="multi-line-signature"> <a href="widgets/PopInvokedWithResultCallback.html">PopInvokedWithResultCallback</a><span class="signature"><<wbr><span class="type-parameter">T</span>></span>? <span class="name ">onPopInvokedWithResult</span> <div class="features"><span class="feature">final</span></div> </section> <section class="desc markdown"> <p>Called after a route pop was handled.</p> <p>It's not possible to prevent the pop from happening at the time that this method is called; the pop has already happened. Use <a href="widgets/PopScope/canPop.html">canPop</a> to disable pops in advance.</p> <p>This will still be called even when the pop is canceled. A pop is canceled when the relevant <a href="widgets/Route/popDisposition.html">Route.popDisposition</a> returns false, such as when <a href="widgets/PopScope/canPop.html">canPop</a> is set to false on a <a href="widgets/PopScope-class.html">PopScope</a>. The <code>didPop</code> parameter indicates whether or not the back navigation actually happened successfully.</p> <p>The <code>result</code> contains the pop result.</p> <p>See also:</p> <ul> <li><a href="widgets/Route/onPopInvokedWithResult.html">Route.onPopInvokedWithResult</a>, which is similar.</li> </ul> </section> <section class="summary source-code" id="source"> <h2><span>Implementation</span></h2> <pre class="language-dart"><code class="language-dart">final PopInvokedWithResultCallback<T>? onPopInvokedWithResult;</code></pre> </section> </div> <!-- /.main-content --> <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left"> <!-- The search input and breadcrumbs below are only responsively visible at low resolutions. --> <header id="header-search-sidebar" class="hidden-l"> <form class="search-sidebar" role="search"> <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search..."> </form> </header> <ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav"> <li><a href="index.html">Flutter</a></li> <li><a href="widgets/widgets-library.html">widgets</a></li> <li><a href="widgets/PopScope-class.html">PopScope<span class="signature"><<wbr><span class="type-parameter">T</span>></span></a></li> <li class="self-crumb">onPopInvokedWithResult property</li> </ol> <h5>PopScope class</h5> <div id="dartdoc-sidebar-left-content"></div> </div><!--/.sidebar-offcanvas--> <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right"> </div><!--/.sidebar-offcanvas--> </main> <footer> <span class="no-break"> Flutter 0.0.0 </span> <script src="footer.js"></script> </footer> <script src="static-assets/highlight.pack.js?v1"></script> <script src="static-assets/docs.dart.js"></script> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-ND4LWWZ" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <!-- Cookie Banner --> <div class="glue-footer"></div> <button aria-hidden="true" class="glue-footer__link glue-cookie-notification-bar-control">Cookies management controls</button> <script src="https://www.gstatic.com/glue/cookienotificationbar/cookienotificationbar.min.js" data-glue-cookie-notification-bar-category="2B"></script> <!-- End Cookie Banner --> </body> </html>