title: Unable to use spread operator in Flutter
body: <p>I need to return a copy of the list _items.I tried using the spread operator by enclosing in square brackets like this " return [..._items]".I'm getting an error which says that spread collections experiment is not enabled,try enabling it. how can I enable that or is there any other way of returning a copy of a list?</p>
  
  <p>Error -> "This requires the 'spread-collections' experiment to be enabled.
  Try enabling this experiment by adding it to the command line when compiling and running.".</p>
  
  <p>I have attached an image that clearly depicts the error ,below.</p>
  
  <p><a href="https://i.stack.imgur.com/gtvAg.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  import '../models/product.dart';
  
  class ProductProvider with ChangeNotifier {
    List&lt;Product&gt; _items = [];
  
    List&lt;Product&gt; get items {
      return [..._items];// I'm getting error here.
  
    }
  
    void addProduct() {
      notifyListeners();
    }
  }
  </code></pre>