Dart 编写Api弃用警告

Posted Ajanuw

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Dart 编写Api弃用警告相关的知识,希望对你有一定的参考价值。

例如body2在以后的版本将被bodyText1代替

  @Deprecated(
    'This is the term used in the 2014 version of material design. The modern term is bodyText1. '
    'This feature was deprecated after v1.13.8.'
  )
  TextStyle get body2 => bodyText1;

用户使用body2将收到以下错误

'body2' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is bodyText1. This feature was deprecated after v1.13.8..
Try replacing the use of the deprecated member with the replacement.

以上是关于Dart 编写Api弃用警告的主要内容,如果未能解决你的问题,请参考以下文章

FBSDKShareLinkContent 属性的“已从 Graph API 2.9 弃用”警告

Apple 警告 ITMS-90809:收到已弃用的 API 使用情况

ITMS-90809:使用 react-native-html-to-pdf 时已弃用 API 使用警告

弃用警告:executable_path 已被弃用 selenium python

如何选择性地静音 Rails 3 弃用警告?

ExtJs 应用程序缓存警告