title: Flutter: Default assignment of List parameter in a constructor
body: <p>Is it possible to assign a constant value to an optional parameter of datatype List while defining a constructor.
  for example,</p>
  
  <pre><code>`class sample{
    final int x;
    final List&lt;String&gt; y;
    sample({this.x = 0; this.y = ["y","y","y","y"]});
   }`
  </code></pre>
  
  <p>the above code throws an error focused at y assignment saying     <code>Default values of an optional parameter must be constant</code></p>
  
  <p>what is the reason for this error?
  how else can I assign a default value to the List?</p>