Repository: flutter
Issue: Document how FutureBuilder.builder shouldn't include logic beyond building widgets (e.g. don't call Navigator.push), and say where to put that logic instead
Labels: c: crash,framework,from: study,d: api docs,f: routes,customer: crowd,P2,team-framework,triaged-framework

How to call Navigator.push in FutureBuilder

error log:
```
I/flutter (29158): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═════════════════════════════════════════════
I/flutter (29158): The following assertion was thrown building FutureBuilder<Result>(dirty, state:
I/flutter (29158): _FutureBuilderState<Result>#de36b):
I/flutter (29158): setState() or markNeedsBuild() called during build.
I/flutter (29158): This Overlay widget cannot be marked as needing to build because the framework is already in the
I/flutter (29158): process of building widgets. A widget can be marked as needing to be built during the build phase
I/flutter (29158): only if one of its ancestors is currently building. This exception is allowed because the framework
I/flutter (29158): builds parent widgets before children, which means a dirty descendant will always be built.
I/flutter (29158): Otherwise, the framework might not visit this widget during this build phase.
I/flutter (29158): The widget on which setState() or markNeedsBuild() was called was:
I/flutter (29158):   Overlay-[LabeledGlobalKey<OverlayState>#a53eb](state: OverlayState#95866(entries:
I/flutter (29158):   [OverlayEntry#8b3e2(opaque: false; maintainState: false), OverlayEntry#0c205(opaque: false;
I/flutter (29158):   maintainState: true), OverlayEntry#8b1ef(opaque: false; maintainState: false),
I/flutter (29158):   OverlayEntry#bcfba(opaque: false; maintainState: true)]))
I/flutter (29158): The widget which was currently being built when the offending call was made was:
I/flutter (29158):   FutureBuilder<Result>(dirty, state: _FutureBuilderState<Result>#de36b)
I/flutter (29158):
I/flutter (29158): When the exception was thrown, this was the stack:
I/flutter (29158): #0      Element.markNeedsBuild.<anonymous closure> (package:flutter/src/widgets/framework.dart:3419:11)
I/flutter (29158): #1      Element.markNeedsBuild (package:flutter/src/widgets/framework.dart:3445:6)
I/flutter (29158): #2      State.setState (package:flutter/src/widgets/framework.dart:1124:14)
I/flutter (29158): #3      OverlayState.insertAll (package:flutter/src/widgets/overlay.dart:301:5)
I/flutter (29158): #4      OverlayRoute.install (package:flutter/src/widgets/routes.dart:35:24)
I/flutter (29158): #5      TransitionRoute.install (package:flutter/src/widgets/routes.dart:167:18)
I/flutter (29158): #6      ModalRoute.install (package:flutter/src/widgets/routes.dart:719:18)
I/flutter (29158): #7      NavigatorState.push.<anonymous closure> (package:flutter/src/widgets/navigator.dart:925:13)
I/flutter (29158): #8      State.setState (package:flutter/src/widgets/framework.dart:1108:30)
I/flutter (29158): #9      NavigatorState.push (package:flutter/src/widgets/navigator.dart:922:5)
I/flutter (29158): #10     Navigator.push (package:flutter/src/widgets/navigator.dart:557:34)
I/flutter (29158): #11     OrderListState.build.futureBuilder.<anonymous closure> (package:dispature/screen/order_new.dart:73:27)
I/flutter (29158): #12     _FutureBuilderState.build (package:flutter/src/widgets/async.dart:504:48)
I/flutter (29158): #13     StatefulElement.build (package:flutter/src/widgets/framework.dart:3713:27)
I/flutter (29158): #14     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3625:15)
I/flutter (29158): #15     Element.rebuild (package:flutter/src/widgets/framework.dart:3478:5)
I/flutter (29158): #16     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2225:33)
I/flutter (29158): #17     BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:621:20)
I/flutter (29158): #18     BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
I/flutter (29158): #19     BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
I/flutter (29158): #20     BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
I/flutter (29158): #21     BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5)
I/flutter (29158): #22     _invoke (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:120)
I/flutter (29158): #23     _drawFrame (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:109)
I/flutter (29158): ══════════════════════════════════════════════
```