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

Assertion failure after setting theme data in MaterialApp -implicit_animations.dart 'style !=null' #11513

Closed
jamesgopinath opened this issue Aug 4, 2017 · 7 comments
Labels
c: crash Stack traces logged to the console framework flutter/packages/flutter repository. See also f: labels.

Comments

@jamesgopinath
Copy link

jamesgopinath commented Aug 4, 2017

Steps to Reproduce

Sample code which produces this error.

import 'dart:async';
import 'package:flutter/material.dart';


void main() {
  runApplication();

}

runApplication() {
  runApp(
      new MaterialApp(
          home: new HomePage(),
      theme: new ThemeData(
        iconTheme: const IconThemeData(color: Colors.black ),
        textTheme: const TextTheme(title: const TextStyle(inherit: true, fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20.0) ),
        backgroundColor: Colors.white,
      )
    )
  );
}

class HomePage extends StatelessWidget{

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text( "Home Page" ),
      ),
      body: new Center(
        child: new Text("TODO"),
      ),
    );
  }
}

Logs

I/flutter (30231): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (30231): The following assertion was thrown building Material(MaterialType.canvas; elevation: 0.0; color:
I/flutter (30231): Color(0xfffafafa); dirty; state: _MaterialState#b6896()):
I/flutter (30231): 'package:flutter/src/widgets/implicit_animations.dart': Failed assertion: line 681 pos 15: 'style !=
I/flutter (30231): null': is not true.
I/flutter (30231): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (30231): more information in this error message to help you determine and fix the underlying cause.
I/flutter (30231): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (30231):   https://github.com/flutter/flutter/issues/new
I/flutter (30231): When the exception was thrown, this was the stack:
I/flutter (30231): #2      new AnimatedDefaultTextStyle (package:flutter/src/widgets/implicit_animations.dart:681:15)
I/flutter (30231): #3      _MaterialState.build (package:flutter/src/material/material.dart:219:22)
I/flutter (30231): #4      StatefulElement.build (package:flutter/src/widgets/framework.dart:3481:27)
I/flutter (30231): #5      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3391:15)
I/flutter (30231): #6      Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #7      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #8      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3509:22)
I/flutter (30231): #9      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #10     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #11     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #12     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #13     Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #14     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #15     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #16     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #17     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #18     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #19     Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #20     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #21     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #22     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #23     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #24     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #25     Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #26     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #27     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3509:22)
I/flutter (30231): #28     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #29     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #30     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #31     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #32     Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #33     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #34     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #35     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #36     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #37     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #38     Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #39     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #40     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #41     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #42     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #43     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #44     Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #45     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #46     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #47     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #48     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #49     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4333:14)
I/flutter (30231): #50     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #51     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #52     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4333:14)
I/flutter (30231): #53     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #54     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #55     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #56     Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #57     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #58     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3509:22)
I/flutter (30231): #59     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #60     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #61     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #62     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #63     Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #64     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #65     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #66     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #67     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #68     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4333:14)
I/flutter (30231): #69     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #70     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #71     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4333:14)
I/flutter (30231): #72     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #73     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #74     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #75     Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #76     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #77     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #78     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #79     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #80     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4333:14)
I/flutter (30231): #81     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #82     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #83     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #84     Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #85     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #86     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3509:22)
I/flutter (30231): #87     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #88     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #89     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #90     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #91     Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #92     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #93     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3509:22)
I/flutter (30231): #94     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #95     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #96     Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #97     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #98     Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #99     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #100    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3509:22)
I/flutter (30231): #101    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #102    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #103    MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4438:32)
I/flutter (30231): #104    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #105    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #106    _TheatreElement.mount (package:flutter/src/widgets/overlay.dart:491:16)
I/flutter (30231): #107    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #108    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #109    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #110    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #111    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #112    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3509:22)
I/flutter (30231): #113    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #114    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #115    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #116    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #117    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #118    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #119    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #120    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #121    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #122    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4333:14)
I/flutter (30231): #123    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #124    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #125    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #126    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #127    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #128    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3509:22)
I/flutter (30231): #129    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #130    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #131    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #132    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4333:14)
I/flutter (30231): #133    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #134    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #135    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4333:14)
I/flutter (30231): #136    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #137    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #138    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #139    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #140    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #141    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3509:22)
I/flutter (30231): #142    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #143    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #144    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #145    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #146    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #147    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #148    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #149    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #150    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #151    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #152    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #153    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #154    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #155    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #156    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #157    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #158    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #159    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #160    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #161    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #162    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #163    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #164    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #165    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #166    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #167    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #168    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #169    SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4333:14)
I/flutter (30231): #170    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #171    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #172    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #173    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #174    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #175    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #176    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #177    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #178    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #179    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #180    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #181    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #182    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #183    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #184    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #185    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #186    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #187    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3509:22)
I/flutter (30231): #188    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #189    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #190    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #191    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #192    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #193    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #194    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #195    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #196    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #197    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #198    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #199    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #200    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #201    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #202    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #203    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #204    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #205    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #206    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #207    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #208    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #209    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #210    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #211    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #212    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3509:22)
I/flutter (30231): #213    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #214    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #215    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #216    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #217    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #218    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #219    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #220    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #221    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #222    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3403:16)
I/flutter (30231): #223    Element.rebuild (package:flutter/src/widgets/framework.dart:3292:5)
I/flutter (30231): #224    ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3371:5)
I/flutter (30231): #225    StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3509:22)
I/flutter (30231): #226    ComponentElement.mount (package:flutter/src/widgets/framework.dart:3366:5)
I/flutter (30231): #227    Element.inflateWidget (package:flutter/src/widgets/framework.dart:2750:14)
I/flutter (30231): #228    Element.updateChild (package:flutter/src/widgets/framework.dart:2553:12)
I/flutter (30231): #229    RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:732:16)
I/flutter (30231): #230    RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:703:5)
I/flutter (30231): #231    RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:649:17)
I/flutter (30231): #232    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2122:19)
I/flutter (30231): #233    RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:648:13)
I/flutter (30231): #234    BindingBase&SchedulerBinding&GestureBinding&ServicesBinding&RendererBinding&WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:543:7)
I/flutter (30231): #235    runApp (package:flutter/src/widgets/binding.dart:581:7)
I/flutter (30231): #236    runApplication (/data/user/0/com.yourcompany.newmenu/cache/new_menu24YN8z/new_menu/lib/TestTheme.dart:11:3)
I/flutter (30231): <asynchronous suspension>
I/flutter (30231): #237    main (/data/user/0/com.yourcompany.newmenu/cache/new_menu24YN8z/new_menu/lib/TestTheme.dart:6:3)
I/flutter (30231): #238    _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:265)
I/flutter (30231): #239    _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)
I/flutter (30231): (elided 2 frames from class _AssertionError)

Flutter Doctor

[√] Flutter (on Microsoft Windows [Version 6.1.7601], locale en-US, channel al
pha)
    ΓÇó Flutter at C:\Users\16907\Projects\Personal\flutter
    ΓÇó Framework revision d36e2f6191 (6 weeks ago), 2017-06-21 15:09:10 -0700
    ΓÇó Engine revision b0dee695ec
    ΓÇó Tools Dart version 1.24.0-dev.6.7

[√] Android toolchain - develop for Android devices (Android SDK 25.0.3)
    ΓÇó Android SDK at C:\Users\16907\AppData\Local\Android\sdk
    ΓÇó Platform android-25, build-tools 25.0.3
    ΓÇó ANDROID_HOME = C:\Users\16907\AppData\Local\Android\sdk
    ΓÇó Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    ΓÇó Java version OpenJDK Runtime Environment (build 1.8.0_76-release-b03)

[√] Android Studio (version 2.2)
    ΓÇó Android Studio at C:\Program Files\Android\Android Studio
    ΓÇó Gradle version 2.14.1
    ΓÇó Java version OpenJDK Runtime Environment (build 1.8.0_76-release-b03)

[√] IntelliJ IDEA Community Edition (version 2017.2)
    ΓÇó Flutter plugin version 15.1
    ΓÇó Dart plugin version 172.3544.34

[√] Connected devices
    ΓÇó SM A500G ΓÇó 7392cc20 ΓÇó android-arm ΓÇó Android 6.0.1 (API 23)
@jason-simmons
Copy link
Member

jason-simmons commented Aug 4, 2017

The MaterialApp is using the TextTheme's body1 style. The TextTheme in this code leaves that style unspecified, resulting in a null exception.

@Hixie should the TextTheme constructor insist that all styles by non-null?

You can construct a TextTheme based on an existing theme that overrides some of its styles:

  textTheme: new Typography(platform: defaultTargetPlatform).black.copyWith(
    title: const TextStyle(inherit: true, fontWeight: FontWeight.bold, color: Colors.black, fontSize: 20.0),
  ),

@Hixie
Copy link
Contributor

Hixie commented Aug 4, 2017

Yeah, the TextTheme constructor should probably require that all the data be filled in. We might need some constructors that make that easier.

@Hixie Hixie added c: crash Stack traces logged to the console framework flutter/packages/flutter repository. See also f: labels. labels Oct 3, 2017
@sandangel
Copy link

I'm facing the same issue. Here is the error logs:

I/flutter (19312): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (19312): The following assertion was thrown building WidgetsApp-[GlobalObjectKey
I/flutter (19312): _MaterialAppState#839ea](dirty, state: _WidgetsAppState#dd50d):
I/flutter (19312): 'package:flutter/src/widgets/title.dart': Failed assertion: line 24 pos 15: 'color != null &&
I/flutter (19312): color.alpha == 0xFF': is not true.
I/flutter (19312): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (19312): more information in this error message to help you determine and fix the underlying cause.
I/flutter (19312): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (19312):   https://github.com/flutter/flutter/issues/new
I/flutter (19312): When the exception was thrown, this was the stack:
I/flutter (19312): #2      new Title (package:flutter/src/widgets/title.dart)
I/flutter (19312): #3      _WidgetsAppState.build (package:flutter/src/widgets/app.dart:617:19)
I/flutter (19312): #4      StatefulElement.build (package:flutter/src/widgets/framework.dart:3730:27)
I/flutter (19312): #5      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3642:15)
I/flutter (19312): #6      Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
I/flutter (19312): #7      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
I/flutter (19312): #8      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3769:11)
I/flutter (19312): #9      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
I/flutter (19312): #10     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
I/flutter (19312): #11     Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
I/flutter (19312): #12     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
I/flutter (19312): #13     Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
I/flutter (19312): #14     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
I/flutter (19312): #15     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
I/flutter (19312): #16     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
I/flutter (19312): #17     Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
I/flutter (19312): #18     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
I/flutter (19312): #19     Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
I/flutter (19312): #20     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
I/flutter (19312): #21     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
I/flutter (19312): #22     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
I/flutter (19312): #23     Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
I/flutter (19312): #24     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
I/flutter (19312): #25     Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
I/flutter (19312): #26     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
I/flutter (19312): #27     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
I/flutter (19312): #28     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
I/flutter (19312): #29     Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
I/flutter (19312): #30     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
I/flutter (19312): #31     Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
I/flutter (19312): #32     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
I/flutter (19312): #33     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3769:11)
I/flutter (19312): #34     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
I/flutter (19312): #35     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
I/flutter (19312): #36     Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
I/flutter (19312): #37     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
I/flutter (19312): #38     Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
I/flutter (19312): #39     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
I/flutter (19312): #40     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
I/flutter (19312): #41     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
I/flutter (19312): #42     Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
I/flutter (19312): #43     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
I/flutter (19312): #44     Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
I/flutter (19312): #45     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
I/flutter (19312): #46     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3769:11)
I/flutter (19312): #47     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
I/flutter (19312): #48     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
I/flutter (19312): #49     Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
I/flutter (19312): #50     RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:857:16)
I/flutter (19312): #51     RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:828:5)
I/flutter (19312): #52     RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:774:17)
I/flutter (19312): #53     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2222:19)
I/flutter (19312): #54     RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:773:13)
I/flutter (19312): #55     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:662:7)
I/flutter (19312): #56     runApp (package:flutter/src/widgets/binding.dart:704:7)
I/flutter (19312): #57     main (file:///home/sand/AndroidStudioProjects/introduce_container/lib/main.dart:5:3)
I/flutter (19312): #58     _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:279:19)
I/flutter (19312): #59     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
I/flutter (19312): (elided 2 frames from class _AssertionError)

Code:

import 'package:flutter/material.dart';
import './ui/home.dart';

void main() {
  runApp(MaterialApp(
    title: 'Theming Flutter',
    home: Home(),
    theme: ThemeData(
      primaryColor: Colors.black54,
      accentColor: Colors.teal.shade500,
      brightness: Brightness.light,
      textTheme: TextTheme(
        title: TextStyle(color: Colors.black54, fontSize: 36.0),
        body1: TextStyle(color: Colors.black54, fontSize: 18.0),
      ),
      backgroundColor: Colors.white
    ),
  ));
}

Note that if I remove the theme prop, the error is no longer appear.

@diefferson
Copy link

Hello, the problem is you can't use colors with transparency in primary and accent colors.

@ghost
Copy link

ghost commented May 11, 2019

@diefferson There is no transparent color usage in this example.

@iapicca
Copy link
Contributor

iapicca commented Nov 1, 2019

Hi @jamesgopinath
I'm closing this issue as it refer to an older version of Flutter.
If you are you still experiencing this issue with the latest version of Flutter,
you may want to open a new issue or comment below;
either way please provide your updated flutter doctor -v.
It would be helpful to have also your flutter run --verbose
and a self contained app on github (or the steps to reproduce it).
Thank you

@iapicca iapicca closed this as completed Nov 1, 2019
@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 26, 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 framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

No branches or pull requests

6 participants