{"action":"opened","issue":{"url":"https://api.github.com/repos/flutter/flutter/issues/25360","repository_url":"https://api.github.com/repos/flutter/flutter","labels_url":"https://api.github.com/repos/flutter/flutter/issues/25360/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/25360/comments","events_url":"https://api.github.com/repos/flutter/flutter/issues/25360/events","html_url":"https://github.com/flutter/flutter/issues/25360","id":390997087,"node_id":"MDU6SXNzdWUzOTA5OTcwODc=","number":25360,"title":"Type ... is not a subtype of type 'Stateless Widget'","user":{"login":"fatherchill","id":10620921,"node_id":"MDQ6VXNlcjEwNjIwOTIx","avatar_url":"https://avatars2.githubusercontent.com/u/10620921?v=4","gravatar_id":"","url":"https://api.github.com/users/fatherchill","html_url":"https://github.com/fatherchill","followers_url":"https://api.github.com/users/fatherchill/followers","following_url":"https://api.github.com/users/fatherchill/following{/other_user}","gists_url":"https://api.github.com/users/fatherchill/gists{/gist_id}","starred_url":"https://api.github.com/users/fatherchill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatherchill/subscriptions","organizations_url":"https://api.github.com/users/fatherchill/orgs","repos_url":"https://api.github.com/users/fatherchill/repos","events_url":"https://api.github.com/users/fatherchill/events{/privacy}","received_events_url":"https://api.github.com/users/fatherchill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-14T07:31:02Z","updated_at":"2018-12-14T07:31:02Z","closed_at":null,"author_association":"NONE","body":"Working on a Flutter Course and an first draft of code produced the following error: 'TextControl' is not a subtype of type 'StatelessWidget'\r\n\r\nI don't need the solution, but the console prompted me to open an issue:\r\n\r\n```\r\n'import 'package:flutter/material.dart';\r\n\r\nvoid main() => runApp(MyApp());\r\n\r\n//1) App with AppBar and text\r\n//2) Button to change text\r\n//3) Split into 3 widgets (App, Text Control, Text)\r\n\r\n\r\nclass MyApp extends StatelessWidget{\r\n\r\n  build(context){\r\n    return MaterialApp(\r\n      title: 'Widgets Basics',\r\n      home: Scaffold(\r\n        appBar: AppBar(\r\n          title: Text(\"Widget Basics\"),\r\n        ),\r\n        body: Center(\r\n          child: TextControl(),\r\n        ),\r\n      ),\r\n    );\r\n  }\r\n}\r\n\r\nclass TextControl extends StatefulWidget{\r\n  final String text = 'First Text';\r\n\r\n\r\n  @override\r\n  TextControlState createState() {\r\n    return new TextControlState();\r\n  }\r\n}\r\n\r\nclass TextControlState extends State<TextControl> {\r\n  build(context){\r\n    return Column(\r\n      children: <Widget>[\r\n        MaterialButton(\r\n          color: Colors.red,\r\n          onPressed: (){\r\n            setState(() {\r\n\r\n            });\r\n          },\r\n          child: Text('Change!'),\r\n        ),\r\n        TextWidget(),\r\n      ],\r\n    );\r\n  }\r\n}\r\n\r\nclass TextWidget extends StatelessWidget{\r\n  build(context){\r\n    return Text(\"Basic Text\");\r\n  }\r\n}\r\n```\r\n\r\nConsole:\r\n\r\n```\r\nI/flutter ( 5641): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════\r\nI/flutter ( 5641): The following assertion was thrown building MediaQuery(MediaQueryData(size: Size(411.4, 683.4),\r\nI/flutter ( 5641): devicePixelRatio: 2.6, textScaleFactor: 1.0, padding: EdgeInsets.zero, viewInsets: EdgeInsets.zero,\r\nI/flutter ( 5641): alwaysUse24HourFormat: false, accessibleNavigation: falsedisableAnimations: falseinvertColors:\r\nI/flutter ( 5641): falseboldText: false)):\r\nI/flutter ( 5641): type 'TextControl' is not a subtype of type 'StatelessWidget'\r\nI/flutter ( 5641): \r\nI/flutter ( 5641): Either the assertion indicates an error in the framework itself, or we should provide substantially\r\nI/flutter ( 5641): more information in this error message to help you determine and fix the underlying cause.\r\nI/flutter ( 5641): In either case, please report this assertion by filing a bug on GitHub:\r\nI/flutter ( 5641):   https://github.com/flutter/flutter/issues/new?template=BUG.md\r\nI/flutter ( 5641): \r\nI/flutter ( 5641): When the exception was thrown, this was the stack:\r\nI/flutter ( 5641): #0      StatelessElement.widget (package:flutter/src/widgets/framework.dart:3771:33)\r\nI/flutter ( 5641): #1      Element.updateChild (package:flutter/src/widgets/framework.dart:2734:17)\r\nI/flutter ( 5641): #2      SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)\r\nI/flutter ( 5641): #3      Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #5      Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #6      ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)\r\nI/flutter ( 5641): #7      Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #8      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #9      Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #10     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)\r\nI/flutter ( 5641): #11     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #12     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4585:32)\r\nI/flutter ( 5641): #13     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4975:17)\r\nI/flutter ( 5641): #14     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #15     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #16     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #17     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)\r\nI/flutter ( 5641): #18     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #19     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #20     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #21     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)\r\nI/flutter ( 5641): #22     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #23     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #24     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #25     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)\r\nI/flutter ( 5641): #26     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #27     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)\r\nI/flutter ( 5641): #28     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #29     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #30     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #31     StatelessElement.update (package:flutter/src/widgets/framework.dart:3781:5)\r\nI/flutter ( 5641): #32     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #33     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)\r\nI/flutter ( 5641): #34     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #35     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #36     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #37     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)\r\nI/flutter ( 5641): #38     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #39     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #40     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #41     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)\r\nI/flutter ( 5641): #42     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #43     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #44     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #45     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)\r\nI/flutter ( 5641): #46     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #47     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #48     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #49     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)\r\nI/flutter ( 5641): #50     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #51     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #52     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #53     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)\r\nI/flutter ( 5641): #54     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #55     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)\r\nI/flutter ( 5641): #56     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #57     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #58     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #59     StatelessElement.update (package:flutter/src/widgets/framework.dart:3781:5)\r\nI/flutter ( 5641): #60     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #61     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)\r\nI/flutter ( 5641): #62     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #63     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)\r\nI/flutter ( 5641): #64     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #65     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)\r\nI/flutter ( 5641): #66     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #67     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)\r\nI/flutter ( 5641): #68     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #69     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #70     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #71     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)\r\nI/flutter ( 5641): #72     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #73     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #74     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #75     StatelessElement.update (package:flutter/src/widgets/framework.dart:3781:5)\r\nI/flutter ( 5641): #76     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #77     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #78     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #79     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)\r\nI/flutter ( 5641): #80     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #81     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)\r\nI/flutter ( 5641): #82     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #83     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #84     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #85     ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)\r\nI/flutter ( 5641): #86     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #87     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)\r\nI/flutter ( 5641): #88     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #89     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #90     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #91     StatefulElement.update (package:flutter/src/widgets/framework.dart:3878:5)\r\nI/flutter ( 5641): #92     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #93     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #94     Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #95     StatelessElement.update (package:flutter/src/widgets/framework.dart:3781:5)\r\nI/flutter ( 5641): #96     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #97     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4867:14)\r\nI/flutter ( 5641): #98     Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #99     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #100    Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #101    ProxyElement.update (package:flutter/src/widgets/framework.dart:3990:5)\r\nI/flutter ( 5641): #102    Element.updateChild (package:flutter/src/widgets/framework.dart:2742:15)\r\nI/flutter ( 5641): #103    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3732:16)\r\nI/flutter ( 5641): #104    Element.rebuild (package:flutter/src/widgets/framework.dart:3547:5)\r\nI/flutter ( 5641): #105    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2286:33)\r\nI/flutter ( 5641): #106    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:676:20)\r\nI/flutter ( 5641): #107    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:219:5)\r\nI/flutter ( 5641): #108    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15)\r\nI/flutter ( 5641): #109    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9)\r\nI/flutter ( 5641): #110    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:751:7)\r\nI/flutter ( 5641): #112    _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)\r\nI/flutter ( 5641): #113    _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)\r\nI/flutter ( 5641): #114    _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)\r\nI/flutter ( 5641): (elided one frame from package dart:async)\r\nI/flutter ( 5641): ════════════════════════════════════════════════════════════════════════════════════════════════════\r\nI/flutter ( 5641): Another exception was thrown: type 'TextControl' is not a subtype of type 'StatelessWidget'\r\nI/chatty  ( 5641): uid=10087(test.test.ass1) Thread-2 identical 3 lines\r\nI/flutter ( 5641): Another exception was thrown: type 'TextControl' is not a subtype of type 'StatelessWidget'\r\nI/flutter ( 5641): Another exception was thrown: The _ScaffoldLayout custom multichild layout delegate forgot to lay out the following child:\r\nI/flutter ( 5641): Another exception was thrown: A RenderFlex overflowed by 199413 pixels on the bottom.\r\nReloaded 1 of 419 libraries in 789ms.\r\n```\r\n\r\n\r\n"}}
{"actor":{"display_login":"fatherchill"}}