title: Dart initializes the final variable
body: <p>I encountered a problem when writing the constructor in dart. I have a class with two final variables, initialize them in the constructor, the following is wrong, because the final variable has no setter method：</p>
  
  <pre><code>class Person{
    final String name;
    final int age; 
  
    // Error
    Person(String name, int age) {
      this.name = name;
      this.age = age;
    }
  }
  </code></pre>
  
  <p>but this is correct, why</p>
  
  <pre><code>class Person{
    final String name;
    final int age; 
  
    // Correct
    Person(String name, int age): this.name = name, this.age = age;
  }
  </code></pre>