title: uploading n number of image to Firebase using Flutter
body: <p>Tried uploading two images into Firebase using flutter.The code only works for one image whereas it is coded for two images!there is no compiler error!</p>
  
  <pre><code>     File _image,_imageside;
  
     Future getImage() async {
     var image = await ImagePicker.pickImage(source: ImageSource.gallery);
     var image2 = await ImagePicker.pickImage(source:ImageSource.gallery);
  
     setState(() {
        _image = image;
        _imageside = image2;
      });
  
   }
      final DatabaseReference database =  FirebaseDatabase.instance.reference().child("test");
      sendData(){
                  final StorageReference firebaseStorageRef =
                                FirebaseStorage.instance.ref().child(name).child('front');
                                final StorageUploadTask task =         firebaseStorageRef.putFile(_image);
                                FirebaseStorage.instance.ref().child(name).child('side');
                                final StorageUploadTask task1 =
                                firebaseStorageRef.putFile(_imageside);
  
      };
             _image == null  ? new Text('No image selected.')  : Text('Image selected'),
                          _imageside ==null? new Text('No image selected.'):Text("Image selected"),
                           RaisedButton(
                      onPressed: getImage,
  
                      child: new Icon(Icons.add_a_photo),
                    ),
       RaisedButton(
                          color: Colors.blueAccent,
  
                          onPressed: () =&gt;sendData(),
                          child:
                          Text("Upload Data"),
                        )
  </code></pre>