title: Insert an image StaggeredGridView that is upload by the user !! The argument type 'File' can't be assigned to the parameter type 'String'
body: <p>I want to create a StaggeredGridView and fill it with images that the user uploads. The problem is that the type of StaggeredGridView is String or <code>ImageProvider&lt;Object&gt;</code> and the file is <code>PickedFile</code> or File</p>
  <p>What is the solution ??</p>
  <pre><code>class GalleryClassOneState extends State&lt;GalleryClassOne&gt; {
    List&lt;File&gt; arrayImage = [];
    File sampleImage;
    final _picker = ImagePicker();
  
    // @override
    // void initState() {
    //   super.initState();
    //   DatabaseReference images =
    //       FirebaseDatabase.instance.reference().child(&quot;NeuralNetwork&quot;);
    // }
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text('Galeria clase 1'),
        ),
        body: Container(padding: EdgeInsets.all(8), child: galeria(arrayImage)),
        floatingActionButton: FloatingActionButton(
          onPressed: _optionsDialogBox,
          tooltip: 'Pick Image',
          child: Icon(Icons.add_outlined),
        ),
      );
    }
  
  
    Widget galeria(List&lt;File&gt; arrayImage) {
      return StaggeredGridView.countBuilder(
        crossAxisCount: 4,
        itemCount: 11,
        itemBuilder: (BuildContext context, int index) {
          return ClipRRect(
            borderRadius: BorderRadius.circular(10),
            child: Container(
              color: Colors.deepPurple,
              child: Column(
                children: &lt;Widget&gt;[
                  Image.network(arrayImage[index])
                ],
              ),
            ),
          );
        },
        // staggeredTileBuilder: (int index) =&gt; new StaggeredTile.fit(1),
        staggeredTileBuilder: (int index) =&gt;
            new StaggeredTile.count(2, index.isEven ? 2 : 1),
        mainAxisSpacing: 10.0,
        crossAxisSpacing: 10.0,
      );
    }
  }
  </code></pre>