title: it's always return null setState()
body: <p>I m uploading an image in firebase storage and downloading URL to retrieve image later.
  I have added Screenshot and more code.
  In print(url) working fine and when passing the value URL to storenewuser function it stores null</p>
  
  <pre><code>This is the upload function:
  </code></pre>
  
  <pre><code>Future uploadPic() async{
      String filename = phoneNumber;
      StorageReference ref = FirebaseStorage.instance.ref().child("User Profile Image").child(filename);
      StorageUploadTask uploadTask = ref.putFile(_Image);
      var downUrl = await (await uploadTask.onComplete).ref.getDownloadURL();
      var url = downUrl.toString();
      print(url);
      if (!mounted) return;
      setState(() {
        ImageUrl=url;
      });
    }
  </code></pre>
  
  <pre><code>SignUp and storing usersdata:
  </code></pre>
  
  <pre><code>void Signup() async{
      if(_key.currentState.validate()){
        FirebaseAuth.instance.createUserWithEmailAndPassword(email: Email, password: Password).then((signedInUser){
          uploadPic();
          UserManagement().storeNewUser(Name,Email,phoneNumber,ImageUrl,RollNumber,Course,Semester,signedInUser.user, context);
        }).catchError((e){
          final snackBar = SnackBar(
            content: Text(e.message),
          );
          Scaffold.of(context).showSnackBar(snackBar);
          print(e);
        });
      }
      else{
        print("NULL");
      }
    }
  
  storeNewUser(Name,Email/*,password*/,phonenumber,ImageUrl,rollnumber,course,sem,user,context){
      Firestore.instance.collection('/users').document(user.uid).setData({
        'Name' : Name,
        'Email' : Email,
        'Image Url' : ImageUrl,
        'Phone Number' : phonenumber,
        'Roll Number' : rollnumber,
        'College' : 'Siliguri Institute of Technology',
        'Course' : course,
        'Semester' : sem
      }).then((value){
          Navigator.of(context).pop();
          Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) =&gt; SignUpCompletePage()));
      }).catchError((e){
        final snackBar = SnackBar(
          content: Text(e.message),
        );
        Scaffold.of(context).showSnackBar(snackBar);
      });
    }
  
  </code></pre>
  
  <p>Database:</p>
  
  <p><a href="https://i.stack.imgur.com/zKPU8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zKPU8.png" alt="enter image description here"></a></p>
  
  <p>Storage:</p>
  
  <p><a href="https://i.stack.imgur.com/QbGXS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QbGXS.png" alt="enter image description here"></a></p>