title: meaning of const in `const ['foo', 'bar']` in dart
body: <p>I know that const is compile-time constant in dart, but I don't understand mechanism behind <code>const [F0, F1, F2]</code> in the following code:</p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code>class Foo {
    static const F0 = 'F0';
    static const F1 = 'F1';
    static const F2 = 'F2';
    // const list of const values I guess...
    static const CONST_LIST = const [F0, F1, F2]; // please explain this line
    static final String FOO = CONST_LIST[0]; // ok
    // compile error: 'const' varaibles must be constant value
    // static const String BAR = CONST_LIST[1];
  }
  
  main() {
    // is CONST_LIST const or not?
    // below line it's ok for dartanalyzer but
    // in runtime: Cannot change the content of an unmodifiable List
    Foo.CONST_LIST[1] = 'new value';
  }
  </code></pre>
  
  <p>I noticed that <code>const</code> is required by dart analyzer in <code>const [F0, F1, F2];</code> but it does make list more like final (runtime immutable list) rather than compile time const.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Another question is why <code>CONST_LIST[1]</code> is not "constant value". See commented declaration of <code>Foo.BAR</code>.</p>