title: What's with the final/const craze in Flutter?
body: <p>Java have <code>final</code> as well as Dart, but as far as I have seen, most Java people avoid using it all the time, since it can make your code less readable. For example, <code>final</code> is used all the time in <code>class</code> constants such as <code>public static final int</code>, but most people avoid using it in a method variable, since it's just seen as "excessive code correctness" by many developers, adding to boilerplate code.</p>
  
  <p>C++ also has <code>const</code> and it can get crazy with it:</p>
  
  <pre><code>char ** const * const x // declare x as const pointer to const pointer to pointer to char
  </code></pre>
  
  <p>Now I am starting to learn Flutter and I am seeing <code>final</code> and <code>const</code> all over the place. Are those really necessary, like when they say:</p>
  
  <blockquote>
    <p>Fields in a Widget subclass are always marked "final".</p>
  </blockquote>
  
  <p>Or can they be treated as "excess of code correctness" and be removed?</p>
  
  <p>Sorry if maybe my question is too stupid, I am really new to Dart and Flutter and I don't know all the side effects/benefits of using <code>final</code> and <code>const</code>, to justify the additional attention of when to remember to use them in my code.</p>