📜  为什么在 dart 中使用私有字段 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:42.399000             🧑  作者: Mango

代码示例1
Public and Private Fields: Why? - You may NOT want other engineers to see all the properties in a class as this would be confusing and allow them to choose the wrong properties. This is especially true when you only want to expose / list getters and setters,and not the properties making up the shortcut getters and setters.