title: image url can't be get from firebase storage to firestore database
body: <p>I tried to store image to firebase storage and try to get an image URL to the database these are the codes.
  this is the code that I used to upload the image to firebase storage.</p>
  
  <pre><code>   uploadNotice()async{
  
     String fileName=basename(noticepic.path);
    final StorageReference firebaseStorageRef=FirebaseStorage.instance
    .ref().child('cisnotices/$fileName');
      StorageUploadTask task = firebaseStorageRef.putFile(noticepic);
      var dowurl = await (await task.onComplete).ref.getDownloadURL();
      var url=dowurl.toString();
      noticeProvider.changePhotoUrl(url).then((val){
          print('photo url got');
        }).catchError((e){
          print(e);
        });
  
  
  
  }
  NoticeProvider noticeProvider=NoticeProvider();
  </code></pre>
  
  <p>here is the <code>noticeprovider.dart</code> I used to change the image URL </p>
  
  <pre><code>class NoticeProvider with ChangeNotifier {
    final firestoreService=FirestoreService();
  
   String _noticeId;
   String _userName;
   String _userPost;
   String _date; 
   String _photoUrl;
   var uuid=Uuid();
  
   //getters
  
   String get userName =&gt; _userName;
   String get userPost =&gt; _userPost;
   String get date =&gt; _date;
   String get photoUrl =&gt; _photoUrl;
  
   //setters
  
    changeUserName(String value){
    _userName=value;
   notifyListeners();
   }
    changeUserPost(String value){
   _userPost=value;
    notifyListeners();
   }
    changeDate(String value){
    _date=value;
    notifyListeners();
  }
   changePhotoUrl(String value){
    _photoUrl=value;
    notifyListeners();
  }
  
   saveNotice(){
    var newNotice=Notice(userName: userName,userPost: userPost,photoUrl: photoUrl,
    date: date,noticeId: uuid.v4());
    firestoreService.saveNotice(newNotice);
  
  
   }
  
  
  
   } 
  </code></pre>
  
  <p>here is <code>firestoreservice.dart</code></p>
  
  <pre><code>  class FirestoreService {
   Firestore _db=Firestore.instance;
  
    Future&lt;void&gt; saveNotice(Notice notice){
       return _db.collection('notices').document(notice.noticeId).setData(notice.toMap());
    }
  
    }
  </code></pre>
  
  <p>image is saved in firebase storage, but the URL can't get to the database. it always shows 'null'.</p>