@protected 在 dart 中是什么意思

Yva*_*van 4 protected dart flutter

正如开发文档所说,Dart doesn't have the keywords public , protected , and private . If an identifier starts with an underscore (_), it's private to its library.但我@protected在 Flutter 框架中发现了很多关键字。这是什么@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);
}
Run Code Online (Sandbox Code Playgroud)

Mar*_*pel 5

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

您可以在此处找到问题。