title: FLUTTER: fromJson and parsedJson method not found, although import 'dart:convert';
body: <p>I just started with flutter and I don't find a solution to this problem. I am currently starting off with the flutter demo provided and trying to convert this step by step to a Cupertino app.</p>
  <p>I also used this nice <a href="https://medium.com/flutter-community/parsing-complex-json-in-flutter-747c46655f51" rel="nofollow noreferrer">read</a> to implement JSON. However, even though I include dart:convert, the JSON methods are not found. The error is</p>
  <pre class="lang-dart prettyprint-override"><code>lib/services/service_textproblem.dart:13:45: Error: Method not found: 'TextProblem.fromJson'.
    TextProblem textproblem = new TextProblem.fromJson(jsonResponse);
                                              ^^^^^^^^
  lib/model/model_textproblem.dart:42:16: Error: Getter not found: 'parsedJson'.
      var list = parsedJson['taskPrmtrs'] as List;
                 ^^^^^^^^^^
  lib/model/model_textproblem.dart:44:12: Error: Getter not found: 'parsedJson'.
      list = parsedJson['taskTags'] as List;
             ^^^^^^^^^^
  </code></pre>
  <p>My service_textproblem.dart looks like this and dart:convert is not highlighted as not being used (other way around, highlighted as being used)</p>
  <pre class="lang-dart prettyprint-override"><code>import 'dart:async' show Future;
  import 'package:flutter/services.dart' show rootBundle;
  import 'dart:convert';
  import 'package:math/model/model_textproblem.dart';
  
  Future&lt;String&gt; _loadTextProblemAsset() async {
    return await rootBundle.loadString('assets/textproblems.json');
  }
  
  Future loadTextProblems() async {
    String jsonString = await _loadTextProblemAsset();
    final jsonResponse = json.decode(jsonString);
    TextProblem textproblem = new TextProblem.fromJson(jsonResponse);
    print(textproblem.problemTasks[0].taskText);
  }
  </code></pre>
  <p>Any ideas what I can do? I couldn't find any similar issue (except people not having included dart:convert)</p>