Access Modifiers and _ symbol
class Employee {
String name;
String _position;
}
void main() {
var employee1 = Employee();
employee1.name = "John Doe";
employee1._position = 'CTO';
print('${employee1.name}: ${employee1._position}');
}
Last updated
Was this helpful?