title: I'm creating an app using dart for a list view of images
body: <p>Basically, I'm learning Dart for the first time. I'm still learning the syntax and everything.
  I have created four files
  1.main dart
  2.app dart
  3.image_list dart
  4.image_model dart
  <a href="https://i.stack.imgur.com/XRUp3.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>I am pasting the code here please can anyone help me.
  Thank you in advance.
  Image_model</p>
  <pre><code>class ImageModel {
    int id;
    String url;
    String title;
    ImageModel(this.id, this.url, this.title);
  
    ImageModel.fromJson(Map&lt;String, dynamic&gt; parsedJson)
      :id = parsedJson['id'],
      url = parsedJson['url'],
      title = parsedJson['title'];  
  }
  </code></pre>
  <p>Image_list</p>
  <pre><code>import 'package:flutter/material.dart';
  import '../models/image_model.dart';
  
  class ImageList extends StatelessWidget {
    final List&lt;ImageModel&gt; images;
  
    ImageList(this.images);
  
    Widget build(context) {
      return ListView.builder(
          itemCount: images.length,
          itemBuilder: (context, int index) {
            return Text(images[index].url);
          },
        );
    }
  }
  </code></pre>
  <p>some part of app dart</p>
  <pre><code>class AppState extends State&lt;App&gt; {
    int counter = 0;
    List&lt;ImageModel&gt; images = [];
  
    void fetchImage() async {
      counter++;
      String url = &quot;https://jsonplaceholder.typicode.com/photos/$counter&quot;;
      var response = await http.post(Uri.parse(url));
      var image_model = ImageModel.fromJson(json.decode(response.body));
  
      setState(() {
        images.add(image_model);
      });
    }
  </code></pre>