flutter报错Failed assertion: line 24 pos 15: 'color != null && color.alpha == 0xFF': is not true

 

原因是

theme: ThemeData(
    primaryColor: Color.fromRGBO(12, 23, 23, 0.8), // 用这个我会报错,我改成Colors.blue就不报错了
   primarySwatch: Colors.blue, 
),

 

 

参考文章:https://stackoverflow.com/questions/61813780/failed-assertion-line-24-pos-15-color-null-color-alpha-0xff-is-not

相关文章:

  • 2021-09-21
  • 2022-12-23
  • 2019-01-20
  • 2021-11-02
  • 2021-09-20
  • 2021-12-03
  • 2021-12-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
相关资源
相似解决方案