198 lines
15 KiB
HTML
Raw Permalink Normal View History

<!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, initial-scale=1">
<meta name="description" content="API docs for the buildPage method from the NoAnimationMaterialPageRoute class, for the Dart programming language.">
<title>buildPage method - NoAnimationMaterialPageRoute class - noAnimationMaterialPageRoute library - Dart API</title>
<!-- required because all the links are pseudo-absolute -->
<base href="../..">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
<link rel="stylesheet" href="static-assets/github.css">
<link rel="stylesheet" href="static-assets/styles.css">
<link rel="icon" href="static-assets/favicon.png">
</head>
<body>
<div id="overlay-under-drawer"></div>
<header id="title">
<button id="sidenav-left-toggle" type="button">&nbsp;</button>
<ol class="breadcrumbs gt-separated dark hidden-xs">
<li><a href="index.html">touch_demonstrator</a></li>
<li><a href="ui_noAnimationMaterialPageRoute/ui_noAnimationMaterialPageRoute-library.html">noAnimationMaterialPageRoute</a></li>
<li><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute-class.html">NoAnimationMaterialPageRoute<span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></a></li>
<li class="self-crumb">buildPage method</li>
</ol>
<div class="self-name">buildPage</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>
</header>
<main>
<div class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
<h5>NoAnimationMaterialPageRoute class</h5>
<ol>
<li class="section-title"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute-class.html#constructors">Constructors</a></li>
<li><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/NoAnimationMaterialPageRoute.html">NoAnimationMaterialPageRoute</a></li>
<li class="section-title inherited">
<a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute-class.html#instance-properties">Properties</a>
</li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/animation.html">animation</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/barrierColor.html">barrierColor</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/barrierDismissible.html">barrierDismissible</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/barrierLabel.html">barrierLabel</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/builder.html">builder</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/canPop.html">canPop</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/completed.html">completed</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/controller.html">controller</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/currentResult.html">currentResult</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/debugLabel.html">debugLabel</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/finishedWhenPopped.html">finishedWhenPopped</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/focusScopeNode.html">focusScopeNode</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/fullscreenDialog.html">fullscreenDialog</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/hashCode.html">hashCode</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/hasScopedWillPopCallback.html">hasScopedWillPopCallback</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/isActive.html">isActive</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/isCurrent.html">isCurrent</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/isFirst.html">isFirst</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/maintainState.html">maintainState</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/navigator.html">navigator</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/offstage.html">offstage</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/opaque.html">opaque</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/overlayEntries.html">overlayEntries</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/popped.html">popped</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/runtimeType.html">runtimeType</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/secondaryAnimation.html">secondaryAnimation</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/semanticsDismissible.html">semanticsDismissible</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/settings.html">settings</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/subtreeContext.html">subtreeContext</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/transitionDuration.html">transitionDuration</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/willHandlePopInternally.html">willHandlePopInternally</a></li>
<li class="section-title"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute-class.html#instance-methods">Methods</a></li>
<li><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/buildTransitions.html">buildTransitions</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/addLocalHistoryEntry.html">addLocalHistoryEntry</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/addScopedWillPopCallback.html">addScopedWillPopCallback</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/buildPage.html">buildPage</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/canTransitionFrom.html">canTransitionFrom</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/canTransitionTo.html">canTransitionTo</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/changedExternalState.html">changedExternalState</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/changedInternalState.html">changedInternalState</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/createAnimation.html">createAnimation</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/createAnimationController.html">createAnimationController</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/createOverlayEntries.html">createOverlayEntries</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/didChangeNext.html">didChangeNext</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/didChangePrevious.html">didChangePrevious</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/didComplete.html">didComplete</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/didPop.html">didPop</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/didPopNext.html">didPopNext</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/didPush.html">didPush</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/didReplace.html">didReplace</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/dispose.html">dispose</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/install.html">install</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/noSuchMethod.html">noSuchMethod</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/removeLocalHistoryEntry.html">removeLocalHistoryEntry</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/removeScopedWillPopCallback.html">removeScopedWillPopCallback</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/setState.html">setState</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/toString.html">toString</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/willPop.html">willPop</a></li>
<li class="section-title inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute-class.html#operators">Operators</a></li>
<li class="inherited"><a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/operator_equals.html">operator ==</a></li>
</ol>
</div><!--/.sidebar-offcanvas-->
<div class="col-xs-12 col-sm-9 col-md-8 main-content">
<h1>buildPage method</h1>
<section class="multi-line-signature">
<div>
<ol class="annotation-list">
<li>@override</li>
</ol>
</div>
<span class="returntype">Widget</span>
<span class="name ">buildPage</span>
(<wbr><span class="parameter" id="buildPage-param-context"><span class="type-annotation">BuildContext</span> <span class="parameter-name">context</span>, </span> <span class="parameter" id="buildPage-param-animation"><span class="type-annotation">Animation<span class="signature">&lt;<wbr><span class="type-parameter">double</span>&gt;</span></span> <span class="parameter-name">animation</span>, </span> <span class="parameter" id="buildPage-param-secondaryAnimation"><span class="type-annotation">Animation<span class="signature">&lt;<wbr><span class="type-parameter">double</span>&gt;</span></span> <span class="parameter-name">secondaryAnimation</span></span>)
<div class="features">inherited</div>
</section>
<section class="desc markdown">
<p>Override this method to build the primary content of this route.</p>
<p>The arguments have the following meanings:</p><ul><li><code>context</code>: The context in which the route is being built.</li><li><code>animation</code>: The animation for this route's transition. When entering,
the animation runs forward from 0.0 to 1.0. When exiting, this animation
runs backwards from 1.0 to 0.0.</li><li><code>secondaryAnimation</code>: The animation for the route being pushed on top of
this route. This animation lets this route coordinate with the entrance
and exit transition of routes pushed on top of this route.</li></ul>
<p>This method is only called when the route is first built, and rarely
thereafter. In particular, it is not automatically called again when the
route's state changes unless it uses <code>ModalRoute.of</code>. For a builder that
is called every time the route's state changes, consider
<a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/buildTransitions.html">buildTransitions</a>. For widgets that change their behavior when the
route's state changes, consider <code>ModalRoute.of</code> to obtain a reference to
the route; this will cause the widget to be rebuilt each time the route
changes state.</p>
<p>In general, <a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/buildPage.html">buildPage</a> should be used to build the page contents, and
<a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/buildTransitions.html">buildTransitions</a> for the widgets that change as the page is brought in
and out of view. Avoid using <a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/buildTransitions.html">buildTransitions</a> for content that never
changes; building such content once from <a href="ui_noAnimationMaterialPageRoute/NoAnimationMaterialPageRoute/buildPage.html">buildPage</a> is more efficient.</p>
</section>
<section class="summary source-code" id="source">
<h2><span>Implementation</span> </h2>
<pre class="language-dart"><code class="language-dart">@override
Widget buildPage(BuildContext context, Animation&lt;double&gt; animation,
Animation&lt;double&gt; secondaryAnimation) {
final Widget result = builder(context);
assert(() {
if (result == null) {
throw FlutterError(
&#39;The builder for route &quot;${settings.name}&quot; returned null.\n&#39;
&#39;Route builders must never return null.&#39;
);
}
return true;
}());
return Semantics(
scopesRoute: true,
explicitChildNodes: true,
child: result,
);
}</code></pre>
</section>
</div> <!-- /.main-content -->
<div class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
</div><!--/.sidebar-offcanvas-->
</main>
<footer>
<span class="no-break">
touch_demonstrator 1.0.0+1
</span>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="static-assets/typeahead.bundle.min.js"></script>
<script src="static-assets/highlight.pack.js"></script>
<script src="static-assets/URI.js"></script>
<script src="static-assets/script.js"></script>
</body>
</html>