<p dir="auto">Just doing what the error asked me to do...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Performing hot reload...                                        |flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown building _CupertinoBackGestureDetector&lt;dynamic&gt;(state:
flutter: _CupertinoBackGestureDetectorState&lt;dynamic&gt;#49fa6):
flutter: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4659 pos 12: 'child == _child':
flutter: is not true.
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter:   https://github.com/flutter/flutter/issues/new
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2      SingleChildRenderObjectElement.forgetChild (package:flutter/src/widgets/framework.dart:4659:12)
flutter: #3      Element._retakeInactiveElement (package:flutter/src/widgets/framework.dart:2880:14)
flutter: #4      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:32)
flutter: #5      Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #6      SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #7      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #8      MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4771:32)
flutter: #9      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #10     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #11     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #12     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #13     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #14     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
flutter: #15     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #16     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #17     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #18     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #19     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #20     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #21     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #22     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #23     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #24     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
flutter: #25     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #26     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #27     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #28     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #29     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #30     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #31     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #32     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #33     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #34     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
flutter: #35     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #36     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #37     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #38     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #39     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #40     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #41     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #42     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #43     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #44     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
flutter: #45     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #46     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #47     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #48     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #49     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #50     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #51     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #52     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #53     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #54     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #55     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #56     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #57     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
flutter: #58     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #59     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #60     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #61     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #62     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #63     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #64     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #65     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #66     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #67     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #68     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #69     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #70     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #71     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #72     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #73     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #74     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #75     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #76     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
flutter: #77     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #78     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #79     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #80     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #81     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #82     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #83     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #84     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #85     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #86     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #87     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #88     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #89     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #90     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #91     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #92     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #93     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #94     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #95     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #96     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #97     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2255:33)
flutter: #98     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding&amp;PaintingBinding&amp;SemanticsBinding&amp;RendererBinding&amp;WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:653:20)
flutter: #99     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding&amp;PaintingBinding&amp;SemanticsBinding&amp;RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
flutter: #100    _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #101    _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
flutter: #102    _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding.scheduleWarmUpFrame.&lt;anonymous closure&gt; (package:flutter/src/scheduler/binding.dart:751:7)
flutter: #104    _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
flutter: #105    _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
flutter: #106    _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
flutter: (elided 3 frames from class _AssertionError and package dart:async)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1503 pos 18: 'debugDoingThisResize || debugDoingThisLayout ||
flutter: Another exception was thrown: RenderBox was not laid out: RenderDecoratedBox#f6bc9 NEEDS-PAINT DETACHED
flutter: Another exception was thrown: RenderBox was not laid out: RenderFractionalTranslation#9a6a5 NEEDS-PAINT DETACHED
flutter: Another exception was thrown: RenderBox was not laid out: RenderFractionalTranslation#dd093 NEEDS-PAINT DETACHED
flutter: Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#7f910 NEEDS-PAINT DETACHED
flutter: Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#c76ae NEEDS-PAINT DETACHED
flutter: Another exception was thrown: RenderBox was not laid out: RenderOffstage#0dc73 NEEDS-PAINT
flutter: Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#7f910 NEEDS-PAINT DETACHED
flutter: Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 3236 pos 12: '_ancestorChain.length == 1': is not true.
flutter: Another exception was thrown: Duplicate GlobalKey detected in widget tree."><pre class="notranslate"><code class="notranslate">Performing hot reload...                                        |flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown building _CupertinoBackGestureDetector&lt;dynamic&gt;(state:
flutter: _CupertinoBackGestureDetectorState&lt;dynamic&gt;#49fa6):
flutter: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4659 pos 12: 'child == _child':
flutter: is not true.
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter:   https://github.com/flutter/flutter/issues/new
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2      SingleChildRenderObjectElement.forgetChild (package:flutter/src/widgets/framework.dart:4659:12)
flutter: #3      Element._retakeInactiveElement (package:flutter/src/widgets/framework.dart:2880:14)
flutter: #4      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:32)
flutter: #5      Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #6      SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #7      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #8      MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4771:32)
flutter: #9      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #10     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #11     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #12     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #13     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #14     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
flutter: #15     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #16     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #17     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #18     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #19     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #20     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #21     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #22     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #23     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #24     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
flutter: #25     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #26     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #27     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #28     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #29     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #30     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #31     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #32     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #33     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #34     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
flutter: #35     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #36     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #37     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #38     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #39     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #40     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #41     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #42     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #43     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #44     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
flutter: #45     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #46     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #47     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #48     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #49     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #50     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #51     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #52     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #53     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #54     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #55     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #56     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #57     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
flutter: #58     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #59     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #60     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #61     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #62     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #63     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #64     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #65     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #66     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #67     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #68     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #69     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #70     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #71     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #72     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #73     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #74     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #75     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #76     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3781:11)
flutter: #77     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #78     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #79     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #80     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #81     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #82     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #83     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #84     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #85     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #86     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4666:14)
flutter: #87     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #88     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #89     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #90     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #91     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3634:5)
flutter: #92     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3629:5)
flutter: #93     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2919:14)
flutter: #94     Element.updateChild (package:flutter/src/widgets/framework.dart:2722:12)
flutter: #95     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3665:16)
flutter: #96     Element.rebuild (package:flutter/src/widgets/framework.dart:3507:5)
flutter: #97     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2255:33)
flutter: #98     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding&amp;PaintingBinding&amp;SemanticsBinding&amp;RendererBinding&amp;WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:653:20)
flutter: #99     _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding&amp;PaintingBinding&amp;SemanticsBinding&amp;RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5)
flutter: #100    _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)
flutter: #101    _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)
flutter: #102    _WidgetsFlutterBinding&amp;BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding.scheduleWarmUpFrame.&lt;anonymous closure&gt; (package:flutter/src/scheduler/binding.dart:751:7)
flutter: #104    _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
flutter: #105    _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
flutter: #106    _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
flutter: (elided 3 frames from class _AssertionError and package dart:async)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion: line 1503 pos 18: 'debugDoingThisResize || debugDoingThisLayout ||
flutter: Another exception was thrown: RenderBox was not laid out: RenderDecoratedBox#f6bc9 NEEDS-PAINT DETACHED
flutter: Another exception was thrown: RenderBox was not laid out: RenderFractionalTranslation#9a6a5 NEEDS-PAINT DETACHED
flutter: Another exception was thrown: RenderBox was not laid out: RenderFractionalTranslation#dd093 NEEDS-PAINT DETACHED
flutter: Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#7f910 NEEDS-PAINT DETACHED
flutter: Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#c76ae NEEDS-PAINT DETACHED
flutter: Another exception was thrown: RenderBox was not laid out: RenderOffstage#0dc73 NEEDS-PAINT
flutter: Another exception was thrown: RenderBox was not laid out: RenderRepaintBoundary#7f910 NEEDS-PAINT DETACHED
flutter: Another exception was thrown: 'package:flutter/src/rendering/object.dart': Failed assertion: line 3236 pos 12: '_ancestorChain.length == 1': is not true.
flutter: Another exception was thrown: Duplicate GlobalKey detected in widget tree.
</code></pre></div>
<p dir="auto">Here's my main.dart, in case that's helpful:</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="void main() =&gt; runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
  ┊ return MaterialApp(
  ┊ ┊ title: 'Gamebook',
  ┊ ┊ home: Scaffold(
  ┊ ┊ ┊ appBar: AppBar(
  ┊ ┊ ┊ ┊ title: Text('Gamebook'),
  ┊ ┊ ┊ ),
  ┊ ┊ ┊ body: Center(
  ┊ ┊ ┊ ┊ child: Gamebook(),
  ┊ ┊ ┊ ),
  ┊ ┊ ),
  ┊ );
  }
}

class GamebookState extends State&lt;Gamebook&gt; {
  @override
  Widget build(BuildContext context) {
  ┊ AssetBundle bundle = DefaultAssetBundle.of(context);
  ┊ return Text(loadAsset(bundle));
  ┊ //return Text(&quot;This is a book where your choices matter!&quot;);
  }

  String loadAsset(AssetBundle bundle) async {
  ┊ return await bundle.loadString('books/Your_Father_The_Hero.md');
  }
}

class Gamebook extends StatefulWidget {
  @override
  GamebookState createState() =&gt; new GamebookState();
}"><pre class="notranslate"><span class="pl-k">void</span> <span class="pl-en">main</span>() <span class="pl-k">=&gt;</span> <span class="pl-en">runApp</span>(<span class="pl-c1">MyApp</span>());

<span class="pl-k">class</span> <span class="pl-c1">MyApp</span> <span class="pl-k">extends</span> <span class="pl-c1">StatelessWidget</span> {
  <span class="pl-k">@override</span>
  <span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) {
  ┊ <span class="pl-k">return</span> <span class="pl-c1">MaterialApp</span>(
  ┊ ┊ title<span class="pl-k">:</span> <span class="pl-s">'Gamebook'</span>,
  ┊ ┊ home<span class="pl-k">:</span> <span class="pl-c1">Scaffold</span>(
  ┊ ┊ ┊ appBar<span class="pl-k">:</span> <span class="pl-c1">AppBar</span>(
  ┊ ┊ ┊ ┊ title<span class="pl-k">:</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Gamebook'</span>),
  ┊ ┊ ┊ ),
  ┊ ┊ ┊ body<span class="pl-k">:</span> <span class="pl-c1">Center</span>(
  ┊ ┊ ┊ ┊ child<span class="pl-k">:</span> <span class="pl-c1">Gamebook</span>(),
  ┊ ┊ ┊ ),
  ┊ ┊ ),
  ┊ );
  }
}

<span class="pl-k">class</span> <span class="pl-c1">GamebookState</span> <span class="pl-k">extends</span> <span class="pl-c1">State</span>&lt;<span class="pl-c1">Gamebook</span>&gt; {
  <span class="pl-k">@override</span>
  <span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) {
  ┊ <span class="pl-c1">AssetBundle</span> bundle <span class="pl-k">=</span> <span class="pl-c1">DefaultAssetBundle</span>.<span class="pl-en">of</span>(context);
  ┊ <span class="pl-k">return</span> <span class="pl-c1">Text</span>(<span class="pl-en">loadAsset</span>(bundle));
  ┊ <span class="pl-c">//return Text("This is a book where your choices matter!");</span>
  }

  <span class="pl-c1">String</span> <span class="pl-en">loadAsset</span>(<span class="pl-c1">AssetBundle</span> bundle) <span class="pl-k">async</span> {
  ┊ <span class="pl-k">return</span> <span class="pl-k">await</span> bundle.<span class="pl-en">loadString</span>(<span class="pl-s">'books/Your_Father_The_Hero.md'</span>);
  }
}

<span class="pl-k">class</span> <span class="pl-c1">Gamebook</span> <span class="pl-k">extends</span> <span class="pl-c1">StatefulWidget</span> {
  <span class="pl-k">@override</span>
  <span class="pl-c1">GamebookState</span> <span class="pl-en">createState</span>() <span class="pl-k">=&gt;</span> <span class="pl-k">new</span> <span class="pl-c1">GamebookState</span>();
}</pre></div>
<p dir="auto">This is a common pattern:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  double get size {
    assert(mounted);
    RenderBox box = context.findRenderObject();
    assert(box != null);
    assert(box.hasSize);
    return box.size;
  }"><pre class="notranslate"><code class="notranslate">  double get size {
    assert(mounted);
    RenderBox box = context.findRenderObject();
    assert(box != null);
    assert(box.hasSize);
    return box.size;
  }
</code></pre></div>
<p dir="auto">We should add this to the BuildContext method as a function that returns a Size. It should assert we're not calling it during a frame (certainly not in the build phase, anyway). In checked mode, it should return a _WidgetDebugSize, a new class that refuses to be used during the build phase.</p>