title: Flutter app crashing when trying to display more than 10 images
body: <p>I am writing my first Flutter app. The app allows the user to take multiple images (from 1 to 50+), and displays each image on the screen all at once using the ListView.</p>
  
  <p>The issue I am having is, the app crashes after roughly 10/12 pictures on the Samsung SM A520F, am guessing this is due to the fact that this is not a very powerful device.</p>
  
  <p>Is there a way I can display the thumbnail of the image instead of loading the full size image?</p>
  
  <p>Error message:
  I don't actually get any error messages, the app just seems to restart!</p>
  
  <p>Here is my code</p>
  
  <pre class="lang-dart prettyprint-override"><code>import 'package:flutter/material.dart';
  import 'package:myapp/utilities/app_constants.dart';
  import 'package:image_picker/image_picker.dart';
  import 'dart:io';
  import 'package:gallery_saver/gallery_saver.dart';
  
  class FormCameraField extends StatefulWidget {
    final InputDecoration decorations;
    final Map field;
    // functions
    final Function onSaved;
    final Function onFieldSubmitted;
  
    FormCameraField({
      this.decorations,
      @required this.field,
      @required this.onSaved,
      @required this.onFieldSubmitted,
    });
  
    @override
    _FormCameraFieldState createState() =&gt; _FormCameraFieldState();
  }
  
  class _FormCameraFieldState extends State&lt;FormCameraField&gt; {
    List&lt;File&gt; images = [];
  
    Future&lt;void&gt; _takePhoto(ImageSource source) async {
      ImagePicker.pickImage(source: source, imageQuality: 90).then(
        (File recordedImage) async {
          if (recordedImage != null &amp;&amp; recordedImage.path != null) {
            try {
              // store image to device gallery
              if (widget.field["StoreCaptureToDevice"] == true) {
                GallerySaver.saveImage(recordedImage.path,
                    albumName: kAppName.replaceAll(" ", "_"));
              }
  
              setState(() {
                images.add(recordedImage);
              });
            } catch (e) {
              print("ERROR SAVING THE FILE TO GALLERY");
              print(e);
            }
          }
        },
      );
    }
  
    @override
    Widget build(BuildContext context) {
      return Column(
        children: &lt;Widget&gt;[
          Row(
            children: &lt;Widget&gt;[
              Expanded(
                child: MaterialButton(
                  child: Text("Take Photo"),
                  onPressed: () async {
                    await _takePhoto(ImageSource.camera);
                  },
                ),
              ),
              Expanded(
                child: MaterialButton(
                  child: Text("Select Photo"),
                  onPressed: () async {
                    await _takePhoto(ImageSource.gallery);
                  },
                ),
              ),
            ],
          ),
          ListView.builder(
            shrinkWrap: true,
            physics: ClampingScrollPhysics(),
            itemCount: images.length,
            itemBuilder: (BuildContext context, index) {
              return Container(
                child: Image.file(
                  images[index],
                ),
              );
            },
          )
        ],
      );
    }
  }
  
  
  </code></pre>