Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve message for assert that catches CupertinoSwitch(value: null) #12948

Closed
steele232 opened this issue Nov 9, 2017 · 6 comments
Closed
Assignees
Labels
c: crash Stack traces logged to the console f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.

Comments

@steele232
Copy link

steele232 commented Nov 9, 2017

Steps to Reproduce

I was just learning how to use the CupertinoSwitch widget and didn't really know anything. I briefly looked at the docs for it a week before attempting to use it in my app.

I just did

             new ListTile(
                  subtitle: new Text('Birthday Notifications'),
                  trailing: new CupertinoSwitch(value: null, onChanged: (bool value) {
                    setState(() {
                      _birthdayIsOn = value;
                    });
                  }),
                ),

because I didn't really know what I was doing. I had previously put in false on the value parameter because I wanted it to start out being false/off and it worked fine. At that point, I also didn't have a good callback, so my Switch wasn't responding to user input. That's when I started experimenting more and put null in for the value.

After the fact, I see that the doc gives a fairly good example, so I recognize that there was more that I could've done to understand how to use it (And I understand it now), but the flutter compiler told me that the error that it gave me wasn't clear and that I should file an issue for this reason.

I've included the Flutter Run results and Flutter Doctor results and I think that is sufficient to file the issue. Nothing in the Flutter Analysis was relavent to this discussion.

Logs

Performing full restart...
Restarted app in 3,442ms.
I/flutter (23159): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (23159): The following assertion was thrown building CupertinoSwitch(state: _CupertinoSwitchState#9e929):
I/flutter (23159): 'package:flutter/src/cupertino/switch.dart': Failed assertion: line 166 pos 15: 'value != null': is
I/flutter (23159): not true.
I/flutter (23159): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (23159): more information in this error message to help you determine and fix the underlying cause.
I/flutter (23159): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (23159):   https://github.com/flutter/flutter/issues/new
I/flutter (23159): When the exception was thrown, this was the stack:
I/flutter (23159): #2      new _RenderCupertinoSwitch (package:flutter/src/cupertino/switch.dart:166:15)
I/flutter (23159): #3      _CupertinoSwitchRenderObjectWidget.createRenderObject (package:flutter/src/cupertino/switch.dart:126:16)
I/flutter (23159): #4      RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4165:28)
I/flutter (23159): #5      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #6      Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #7      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #8      Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #9      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #10     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #11     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #12     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #13     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #14     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #15     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #16     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #17     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #18     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #19     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #20     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #21     Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #22     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #23     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #24     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #25     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #26     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #27     Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #28     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #29     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #30     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #31     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #32     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #33     Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #34     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #35     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #36     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #37     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4638:32)
I/flutter (23159): #38     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #39     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #40     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #41     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #42     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #43     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #44     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #45     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #46     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #47     Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #48     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #49     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #50     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #51     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #52     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #53     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #54     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #55     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #56     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #57     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #58     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #59     Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #60     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #61     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #62     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #63     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #64     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #65     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #66     Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #67     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #68     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #69     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #70     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #71     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #72     Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #73     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #74     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #75     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #76     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #77     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #78     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #79     Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #80     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #81     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #82     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #83     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4638:32)
I/flutter (23159): #84     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #85     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #86     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #87     Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #88     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #89     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #90     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #91     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #92     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #93     Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #94     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #95     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #96     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #97     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #98     Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #99     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #100    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #101    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #102    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #103    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #104    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #105    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #106    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #107    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #108    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #109    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #110    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #111    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #112    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #113    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #114    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #115    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #116    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #117    MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4638:32)
I/flutter (23159): #118    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #119    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #120    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #121    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #122    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #123    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #124    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #125    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #126    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #127    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #128    MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4638:32)
I/flutter (23159): #129    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #130    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #131    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #132    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #133    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #134    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #135    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #136    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #137    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #138    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #139    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #140    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #141    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #142    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #143    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #144    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #145    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #146    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #147    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #148    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #149    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #150    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #151    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #152    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #153    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #154    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #155    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #156    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #157    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #158    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #159    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #160    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #161    MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4638:32)
I/flutter (23159): #162    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #163    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #164    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #165    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #166    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #167    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #168    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #169    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #170    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #171    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #172    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #173    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #174    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #175    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #176    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #177    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #178    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #179    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #180    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #181    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #182    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #183    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #184    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #185    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #186    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #187    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #188    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #189    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #190    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #191    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #192    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #193    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #194    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #195    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #196    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #197    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #198    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #199    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #200    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #201    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #202    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #203    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #204    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #205    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #206    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #207    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #208    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #209    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #210    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #211    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #212    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #213    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #214    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #215    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #216    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #217    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #218    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #219    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #220    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #221    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #222    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #223    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #224    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #225    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #226    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #227    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #228    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #229    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #230    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #231    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #232    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #233    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #234    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #235    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #236    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #237    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #238    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #239    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #240    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #241    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #242    MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4638:32)
I/flutter (23159): #243    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #244    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #245    _TheatreElement.mount (package:flutter/src/widgets/overlay.dart:493:16)
I/flutter (23159): #246    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #247    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #248    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #249    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #250    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #251    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #252    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #253    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #254    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #255    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #256    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #257    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #258    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #259    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #260    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #261    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #262    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #263    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #264    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #265    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #266    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #267    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #268    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #269    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #270    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #271    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #272    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #273    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #274    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4533:14)
I/flutter (23159): #275    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #276    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #277    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #278    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #279    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #280    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3668:22)
I/flutter (23159): #281    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #282    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #283    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #284    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #285    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #286    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3530:5)
I/flutter (23159): #287    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3525:5)
I/flutter (23159): #288    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
I/flutter (23159): #289    Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
I/flutter (23159): #290    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #291    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #292    ProxyElement.update (package:flutter/src/widgets/framework.dart:3797:5)
I/flutter (23159): #293    Element.updateChild (package:flutter/src/widgets/framework.dart:2682:15)
I/flutter (23159): #294    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4540:14)
I/flutter (23159): #295    Element.updateChild (package:flutter/src/widgets/framework.dart:2682:15)
I/flutter (23159): #296    RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4267:32)
I/flutter (23159): #297    MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4648:17)
I/flutter (23159): #298    Element.updateChild (package:flutter/src/widgets/framework.dart:2682:15)
I/flutter (23159): #299    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #300    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #301    StatefulElement.update (package:flutter/src/widgets/framework.dart:3687:5)
I/flutter (23159): #302    Element.updateChild (package:flutter/src/widgets/framework.dart:2682:15)
I/flutter (23159): #303    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4540:14)
I/flutter (23159): #304    Element.updateChild (package:flutter/src/widgets/framework.dart:2682:15)
I/flutter (23159): #305    RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:4267:32)
I/flutter (23159): #306    MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:4648:17)
I/flutter (23159): #307    Element.updateChild (package:flutter/src/widgets/framework.dart:2682:15)
I/flutter (23159): #308    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3562:16)
I/flutter (23159): #309    Element.rebuild (package:flutter/src/widgets/framework.dart:3451:5)
I/flutter (23159): #310    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2251:33)
I/flutter (23159): #311    BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:580:20)
I/flutter (23159): #312    BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:200:5)
I/flutter (23159): #313    BindingBase&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:713:15)
I/flutter (23159): #314    BindingBase&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:649:9)
I/flutter (23159): #315    _invoke (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:91)
I/flutter (23159): #316    _drawFrame (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:80)
I/flutter (23159): (elided 2 frames from class _AssertionError)
I/flutter (23159): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (23159): Another exception was thrown: A horizontal RenderFlex overflowed by 99688 pixels.

Flutter Doctor

Paste the output of running flutter doctor here.
[✓] Flutter (on Mac OS X 10.12.6 16G29, locale en-US, channel alpha)
• Flutter at /Users/jonathansteele/flutter
• Framework revision e8aa40e (3 weeks ago), 2017-10-17 15:42:40 -0700
• Engine revision 7c41428
• Tools Dart version 1.25.0-dev.11.0

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.3)
• Android SDK at /Users/jonathansteele/Library/Android/sdk
• Platform android-25, build-tools 25.0.3
• 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 9.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.1, Build version 9B55
• ios-deploy 1.9.2
• CocoaPods version 1.3.1

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

[✓] IntelliJ IDEA Ultimate Edition (version 2017.1.2)
• Flutter plugin version 17.0
• Dart plugin version 171.4424

[✓] Connected devices
• XT1094 • TA99120J8Y • android-arm • Android 5.1 (API 22)

@Hixie Hixie added c: crash Stack traces logged to the console framework flutter/packages/flutter repository. See also f: labels. labels Nov 14, 2017
@Hixie Hixie added this to the 3: Current Milestone milestone Nov 14, 2017
@Hixie
Copy link
Contributor

Hixie commented Dec 20, 2017

Where there any analyzer warnings?

@Hixie Hixie modified the milestones: 3: Current Milestone, 4: Next milestone Dec 20, 2017
@Hixie Hixie changed the title Needs a better error description for a Cupertino Switch with (value: null) Improve message for assert that catches CupertinoSwitch(value: null) Dec 20, 2017
@Hixie
Copy link
Contributor

Hixie commented Dec 20, 2017

(We should probably consider improving these != null asserts across the board, but I've been putting it off hoping we'll get real non-nullability before this becomes a real problem.)

@steele232
Copy link
Author

steele232 commented Dec 20, 2017 via email

@Hixie
Copy link
Contributor

Hixie commented Dec 21, 2017

Thanks for the update. We'll improve the error message, though this won't happy in the near future.

@goderbauer goderbauer added the f: cupertino flutter/packages/flutter/cupertino repository label Dec 28, 2018
@xster
Copy link
Member

xster commented Mar 25, 2019

We should document CupertinoSwitch.value that it can't be null and assert != null in the constructor.

LongCatIsLooong added a commit that referenced this issue Mar 27, 2019
Documented CupertinoSwitch.value that it can't be null and added an assertion value != null in the constructor.

Related issue: #12948
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: crash Stack traces logged to the console f: cupertino flutter/packages/flutter/cupertino repository framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

No branches or pull requests

5 participants