title: Invalid argument(s): Illegal argument in isolate message : (object is a closure - Function 'createDataList':.)
body: <p>I tried to fetch data from the internet with moviedb API, I followed the tutorial at <a href="https://flutter.io/cookbook/networking/fetch-data/" rel="noreferrer">https://flutter.io/cookbook/networking/fetch-data/</a></p>
  
  <p>but I'm getting the below error. </p>
  
  <blockquote>
    <p>Invalid argument(s): Illegal argument in isolate message : (object is a closure - Function 'createDataList':.)</p>
  </blockquote>
  
  <p>This my code </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Future&lt;List&lt;DataModel&gt;&gt; fetchData() async{
      final response = await http.get("https://api.themoviedb.org/3/movie/now_playing?api_key=d81172160acd9daaf6e477f2b306e423&amp;language=en-US");
  
      if(response.statusCode == 200){
  
        return compute(createDataList,response.body.toString());
      }
    }
  
    List&lt;DataModel&gt; createDataList(String responFroJson) {
      final parse  = json.decode(responFroJson).cast&lt;Map&lt;String, dynamic&gt;&gt;();
  
      return parse.map&lt;DataModel&gt; ((json) =&gt; DataModel.fromtJson(json)).toList();
    }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Screenshot of the error message
  <a href="https://i.stack.imgur.com/0tKHB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0tKHB.png" alt="enter image description here"></a></p>