@protected在dart中是什么意思

正如开发文档所说,Dart doesn't have the keywords public,protected,and private . If an identifier starts with an underscore (_),it's private to its library.但是我在Flutter框架中发现了许多@protected关键字。 @protected是什么意思?

abstract class InheritedWidget extends ProxyWidget {
  const InheritedWidget({ Key key,Widget child })
    : super(key: key,child: child);

  @override
  InheritedElement createElement() => InheritedElement(this);

  @protected
  bool updateShouldNotify(covariant InheritedWidget oldWidget);
}
liuzhaobing 回答:@protected在dart中是什么意思

Dart分析器用于在子类之外使用成员时提供提示。

您可以找到问题here

本文链接:https://www.f2er.com/2351185.html

大家都在问