setter in dart code example
Example: dart setters
// getter: return_type get field_name { }
String get emp_name {
return empName;
}
// setter: set field_name { }
void set emp_name(String name) {
this.empName = name;
}
// getter: return_type get field_name { }
String get emp_name {
return empName;
}
// setter: set field_name { }
void set emp_name(String name) {
this.empName = name;
}