> For the complete documentation index, see [llms.txt](https://eece.gitbook.io/mist-innovation-club-flutter-course-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eece.gitbook.io/mist-innovation-club-flutter-course-1/dart-fundamentals-1/untitled/default-getters-and-setters.md).

# Implicit / Default Getters & Setters

{% embed url="<https://youtu.be/FR_c4vzSFKk>" %}

{% hint style="success" %}
Getters and setters are special methods that provide read and write access to an object’s properties
{% endhint %}

```dart
void main() {
  
   
  // Default/ Implicit  Getters & Setters 
  
  
  
  var employee1 =   Employee();  // Creating employee1 object   
   
  var  employee2 =  Employee(); // Creating employee2  object 
  
  
  
  
  
  
   // Setting the instance variable of employee1 object 
   
  
  // Implict Setters 
  employee1.id =1;
  employee1.name ="John Doe";
  employee1.position ="CTO";
  
  
  
  employee2.id =2;
  employee2.name ="Jane Doe";
  employee2.position ="CEO";
  
  
  
  // Implicit Getters 
  
  print(employee1.id);
  print(employee1.name);
  print(employee1.position);
 
  
  print(employee2.id);
  print(employee2.name);
  print(employee2.position);
 
  
  
  
  
}

class Employee{
  
  
  int id;
  
  String name;
  
  String position;  

  
  
  
  
}
```

{% tabs %}
{% tab title="Setter" %}
![](/files/-MD_7tRGb7aNm92rr3Yw)
{% endtab %}

{% tab title="Getter" %}
![](/files/-MD_8-X0-5NlrLQsLOWk)
{% endtab %}
{% endtabs %}
