[英]Flutter Error after upgrade to latest version
recently updated my flutter to v2.5.3 and I'm getting the following error :最近将我的颤振更新到 v2.5.3,我收到以下错误:
371:41: Error: The getter 'subhead' isn't defined for the class 'TextTheme'. 371:41:错误:没有为类“TextTheme”定义吸气剂“副标题”。
The error is somewhat self explanatory: The subhead
property no longer exists in newer versions of the TextTheme
, as per the 2018 Material Design guidelines.该错误有点不言自明:根据 2018 Material Design 指南,新版本的
TextTheme
中不再存在subhead
属性。
If I'm not mistaken you should instead use subtitle1
as a closest replacement, but feel free to take a look at the Flutter documentation to find out which property to use instead.如果我没记错的话,您应该改用
subtitle1
作为最接近的替代品,但请随时查看Flutter 文档以找出要使用的属性。
See also this other SO question that also uses subhead
:另请参阅也使用
subhead
的其他 SO 问题:
How to use Flutter AppTheme TextTheme without overriding automatic text color如何在不覆盖自动文本颜色的情况下使用 Flutter AppTheme TextTheme
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.