[英]what does @protected mean in dart
正如開發文檔所說, Dart doesn't have the keywords public, protected, and private. If an identifier starts with an underscore (_), it's private to its library.
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);
}
當 Dart Analyzer 在子類之外使用成員時,它用於提供提示。
你可以在這里找到問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.