Issue 1:
This bug is filed to track a suboptimal hot reload experience during a step in our primary codelab (https://codelabs.developers.google.com/codelabs/flutter/). Other similar bugs exist for other steps.

This bug tracks step 5, part I (Add an interactive text input field).

Before code:

import 'package:flutter/material.dart';

void main() {
runApp(new FriendlychatApp());
}

class FriendlychatApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: "Friendlychat",
home: new ChatScreen(),
);
}
}

class ChatScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(title: new Text("Friendlychat")),
);
}
}

After code:

import 'package:flutter/material.dart';

void main() {
runApp(new FriendlychatApp());
}

class FriendlychatApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: "Friendlychat",
home: new ChatScreen(),
);
}
}

class ChatScreen extends StatefulWidget {
@override
State createState() => new ChatScreenState();
}

class ChatScreenState extends State<ChatScreen> {
final TextEditingController _textController = new TextEditingController();

@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(title: new Text("Friendlychat")),
body: _buildTextComposer(),
);
}

Widget _buildTextComposer() {
return new Container(
margin: const EdgeInsets.symmetric(horizontal: 8.0),
child: new TextField(
controller: _textController,
onSubmitted: _handleSubmitted,
decoration: new InputDecoration.collapsed(hintText: "Send a message"),
),
);
}

void _handleSubmitted(String text) {
_textController.clear();
}
}

Result:

Reloaded 1 of 470 libraries in 372ms.
══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
type 'ChatScreen' is not a subtype of type 'StatelessWidget' of 'function result' where
ChatScreen is from
/Users/mit/Library/Developer/CoreSimulator/Devices/F49C5FF1-1784-4AC6-ACFD-C1D4222F3EDB/data/Containers/Data/Application/C52A7C9F-3328-4505-AE73-1A410B47A6C0/tmp/test011WLnNZ/test01/lib/main.dart
StatelessWidget is from package:flutter/src/widgets/framework.dart
Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new
When the exception was thrown, this was the stack:
Reloaded 1 of 470 libraries in 689ms.
Some program elements were changed during reload but did not run when the view was reassembled;
you may need to restart the app for the changes to have an effect.
• ChatScreenState (lib/main.dart:22)
• ChatScreen.createState (lib/main.dart:19)

Root causes:

Changing from Stateless to Stateful widget

Issue 2:
Steps to Reproduce

Make a class that extends StatelessWidget.

flutter run

Change your class to extend StatefulWidget

Hot-reload

Result: Assertion failure in StatelessElement.widget (or StatefulElement.update if you're going the other direction). Hot-restarting fixes the issue.

Suggestion: We should detect this case and show a helpful error message that suggests hot-restarting, or ideally just rebuild the parts of the app that need to be rebuilt.

/cc @Hixie @jason-simmons @sethladd

Related bugs: #9771 #9761

Logs

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown building _ModalScopeStatus(active):
type 'MyHomePage' is not a subtype of type 'StatelessWidget' of 'function result' where
The following assertion was thrown building _ModalScopeStatus(active):
MyHomePage is from
type 'MyHomePage' is not a subtype of type 'StatelessWidget' of 'function result' where
/Users/jackson/Library/Developer/CoreSimulator/Devices/5F90A4C3-6F80-446A-88CB-5394635BF8EF/data/Containers/Data/Application/03A8AB58-F47E-454A-8742-818E868A855D/tmp/scope_exampleCOE3SC/scope_example/lib/main.dart
MyHomePage is from
StatelessWidget is from package:flutter/src/widgets/framework.dart
/Users/jackson/Library/Developer/CoreSimulator/Devices/5F90A4C3-6F80-446A-88CB-5394635BF8EF/data/Containers/Data/Application/03A8AB58-F47E-454A-8742-818E868A855D/tmp/scope_exampleCOE3SC/scope_example/lib/main.dart
StatelessWidget is from package:flutter/src/widgets/framework.dart
Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
https://github.com/flutter/flutter/issues/new
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new
When the exception was thrown, this was the stack:
#0 StatelessElement.widget (package:flutter/src/widgets/framework.dart:3196:39)
#1 Element.updateChild (package:flutter/src/widgets/framework.dart:2290:17)
#2 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#3 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#2 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#3 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#4 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#5 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#6 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#7 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#8 StatelessElement.update (package:flutter/src/widgets/framework.dart:3206:5)
#9 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#10 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#9 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#11 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#12 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#10 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#13 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#11 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#12 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#14 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#13 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#15 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#16 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#14 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#17 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#15 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#16 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#18 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#19 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#17 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#20 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#18 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#21 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#19 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#22 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#20 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#23 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#21 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#22 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#24 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#23 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#25 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#26 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#24 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#25 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#27 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#26 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#28 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#29 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#27 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#30 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#28 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#31 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#32 StatelessElement.update (package:flutter/src/widgets/framework.dart:3206:5)
#29 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#33 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#30 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#34 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#35 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#31 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#32 StatelessElement.update (package:flutter/src/widgets/framework.dart:3206:5)
#36 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#33 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#34 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#37 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#35 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#38 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#36 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#39 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#37 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#40 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#38 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#41 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#42 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#39 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#40 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#43 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#44 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#41 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#45 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#42 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#46 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#43 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#47 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#44 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#48 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#49 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#45 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#50 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#46 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#51 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#47 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#52 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#53 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#48 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#54 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#49 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#55 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#56 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:3818:32)
#50 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#57 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4200:17)
#51 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#58 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#52 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#53 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#59 _TheatreElement.update (package:flutter/src/widgets/overlay.dart:507:16)
#60 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#54 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#61 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#55 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#62 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#56 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:3818:32)
#63 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#57 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4200:17)
#64 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#58 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#65 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#59 _TheatreElement.update (package:flutter/src/widgets/overlay.dart:507:16)
#66 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#60 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#67 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#61 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#68 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#62 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#69 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#70 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#63 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#64 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#71 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#65 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#72 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#73 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#66 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#74 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#67 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#75 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#76 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#68 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#69 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#77 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#70 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#78 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#71 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#79 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#80 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#72 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#73 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#81 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#74 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#82 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#75 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#83 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#76 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#84 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#85 StatelessElement.update (package:flutter/src/widgets/framework.dart:3206:5)
#77 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#86 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#78 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#87 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#88 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#79 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#89 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#80 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#90 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#91 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#81 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#92 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#93 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#82 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#94 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#83 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#95 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#96 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#84 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#97 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#98 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#85 StatelessElement.update (package:flutter/src/widgets/framework.dart:3206:5)
#99 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#86 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#100 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#87 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#88 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#101 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#102 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#89 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#103 StatelessElement.update (package:flutter/src/widgets/framework.dart:3206:5)
#90 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#104 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#105 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#91 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#106 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#107 StatelessElement.update (package:flutter/src/widgets/framework.dart:3206:5)
#92 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#108 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#93 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#109 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#94 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#110 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#95 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#111 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#112 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#96 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#113 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#97 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#114 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#115 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#98 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#116 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#99 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4092:14)
#117 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#100 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#118 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#119 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#101 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#120 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#102 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#121 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#122 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#103 StatelessElement.update (package:flutter/src/widgets/framework.dart:3206:5)
#123 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#124 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#104 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#125 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#126 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#105 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#127 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#128 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#106 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#129 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#130 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#107 StatelessElement.update (package:flutter/src/widgets/framework.dart:3206:5)
#131 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:1898:33)
#108 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#132 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:360:20)
#133 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:170:5)
#109 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#134 BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:685:15)
#135 BindingBase&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:633:9)
#110 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#136 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/rendering/binding.dart:247:20)
#111 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#138 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:366)
#112 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#139 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:394)
#113 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#140 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
#114 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#115 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
(elided one frame from package dart:async-patch)
#116 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
════════════════════════════════════════════════════════════════════════════════════════════════════
#117 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#118 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#119 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#120 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#121 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#122 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#123 ProxyElement.update (package:flutter/src/widgets/framework.dart:3392:5)
#124 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#125 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#126 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#127 StatefulElement.update (package:flutter/src/widgets/framework.dart:3281:5)
#128 Element.updateChild (package:flutter/src/widgets/framework.dart:2298:15)
#129 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3156:16)
#130 Element.rebuild (package:flutter/src/widgets/framework.dart:3045:5)
#131 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:1898:33)
#132 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:360:20)
#133 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:170:5)
#134 BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:685:15)
#135 BindingBase&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:633:9)
#136 BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/rendering/binding.dart:247:20)
#138 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:366)
#139 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:394)
#140 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
(elided one frame from package dart:async-patch)
════════════════════════════════════════════════════════════════════════════════════════════════════
Another exception was thrown: type 'MyHomePage' is not a subtype of type 'StatelessWidget' of 'function result' where
Another exception was thrown: type 'MyHomePage' is not a subtype of type 'StatelessWidget' of 'function result' where
Another exception was thrown: type 'MyHomePage' is not a subtype of type 'StatelessWidget' of 'function result' where
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 4112 pos 12: 'renderObject.child == child': is not true.
Another exception was thrown: 'package:flutter/src/widgets/framework.dart': Failed assertion: line 1896 pos 16: '!_dirtyElements[index]._active || _dirtyElements[index]._debugIsInScope(context)': is not true.
Reloaded 1 of 427 libraries in 788ms.

Run flutter analyze and attach any output of that command also.

Flutter Doctor

[✓] Flutter (on Mac OS X 10.12.4 16E195, channel unknown)
• Flutter at /Users/jackson/git/flutter
• Framework revision 1d726bbeb5 (2 days ago), 2017-05-02 12:53:03 -0700
• Engine revision da8ebf40bd
• Tools Dart version 1.23.0-dev.11.11

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
• Android SDK at /Users/jackson/Library/Android/sdk/
• Platform android-25, build-tools 25.0.2
• ANDROID_HOME = /Users/jackson/Library/Android/sdk/
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[-] iOS toolchain - develop for iOS devices (Xcode 8.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 8.3.1, Build version 8E1000a
• ios-deploy 1.9.1
✗ libimobiledevice is incompatible with the installed Xcode version. To update, run:
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew install --HEAD libimobiledevice
• CocoaPods version 1.0.1

[✓] Android Studio (version 2.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Gradle version 3.2
• Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Community Edition (version 2016.3.4)
• Dart plugin version 163.13137
• Flutter plugin version 0.1.11.2

[✓] Connected devices
• • 14710ae2e8497590643751c5532d907ed1ff2eed • ios • iOS ()
• iPhone 7 Plus • 5F90A4C3-6F80-446A-88CB-5394635BF8EF • ios • iOS 10.3 (simulator)