title: Flutter show data from mock .json file
body: <p>I'm trying to load data from a mock <code>recipes.json</code> file in flutter and I have a structure like this</p>
  <pre><code>lib
  |__mock_data
     |__recipes.json
  |__src
     |__models
     |__components
     |__screens
  |__app.dart
  |__main.dart
  </code></pre>
  <p>Now I have created a model which looks like this:</p>
  <pre><code>class RecipeModel {
    RecipeModel({
      required this.id,
      required this.name,
      required this.videoLink,
      required this.author,
      required this.category,
      required this.time,
    });
  
    String id;
    String name;
    String videoLink;
    String author;
    String category;
    String time;
  
    factory RecipeModel.fromJson(Map&lt;String, dynamic&gt; json) =&gt; RecipeModel(
          id: json[&quot;id&quot;] == null ? null : json[&quot;id&quot;],
          name: json[&quot;name&quot;] == null ? null : json[&quot;name&quot;],
          videoLink:
              json[&quot;audioAssetPath&quot;] == null ? null : json[&quot;audioAssetPath&quot;],
          author: json[&quot;isRemoteUrl&quot;] == null ? null : json[&quot;isRemoteUrl&quot;],
          category: json[&quot;iconUrl&quot;] == null ? null : json[&quot;iconUrl&quot;],
          time: json[&quot;vol&quot;] == null ? null : json[&quot;vol&quot;].toDouble(),
        );
  }
  </code></pre>
  <p>In the page where I want to show the data I'm doing this:</p>
  <pre><code>  Future&lt;List&lt;RecipeModel&gt;&gt; fetchRecipes() async {
      String url =
          &quot;https://raw.githubusercontent.com/boriszv/json/master/random_example.json&quot;;
      var response = await http.get(url);  -----------&gt;The argument type 'String' can't be assigned to the parameter type 'Uri'
      print(response);
      var recipes = &lt;RecipeModel&gt;[];
      var recipesJson = json.decode(response.body);
      for (var index in recipesJson) {
        recipes.add(RecipeModel.fromJson(index));
      }
      throw '';
    }
  
    @override
    void initState() {
      super.initState();
      fetchRecipes();
    }
  </code></pre>
  <p>I get a error when assigning the URL and also how to load the current <code>recipe.json</code> data?</p>
  <p>N.B: Are the models written right?Because there might be a shift from <code>json</code> to <code>protobuf</code></p>