他们为什么在实例名称中使用下划线?

Ale*_*tin 1 dart flutter

许多公共示例代码,pub插件代码包括带有实例的类和状态,这些实例以下划线作为前缀命名。什么事啊 这种时尚来自哪里?它是Dart中流行的编程模式,还是只是出于品味?:D

class State extends State<widget>{
  int _index = 1;
  _increment() => _index++;
}
Run Code Online (Sandbox Code Playgroud)

Mul*_*dec 5

来自Dart语言之旅

Unlike Java, Dart doesn’t have the keywords public, protected, and private. If an identifier starts with an underscore (_), it’s private to its library.