title: Firebase Storage Resource Not Downloading in Flutter App
body: <p>I am attempting to download a .mp3 from my Firebase Cloud Storage project per <a href="https://firebase.flutter.dev/docs/storage/usage/#downloading-files" rel="nofollow noreferrer">this documentation</a>, but pressing the elevated button (Android emulator) does nothing. When I say nothing I mean nothing, the print statement I added immediately after calling  getApplicationDocumentsDirectory() is never output to console. This simple code is  verbatim from the Firebase docs, what am I missing? I've added permissions in AndroidManifest to allow INTERNET and WRITE_EXTERNAL_STORAGE.</p>
  <pre><code>  fs.FirebaseStorage storage = fs.FirebaseStorage.instance;
  
  ElevatedButton(
                onPressed: () {
                  Future&lt;void&gt; download() async {
                    Directory dir = await getApplicationDocumentsDirectory();
                    print(&quot;File downloading to : ${dir}&quot;);
                    File file = File(
                        '${dir.path}/track-title');
  
                    fs.DownloadTask task = storage
                        .ref(
                             'gs://project_name.appspot.com/track-title') 
                              // 'project_name/track-title' as shown in docs also does not work
                        .writeToFile(file);
  
                    task.snapshotEvents.listen((fs.TaskSnapshot snapshot) {
                      print('Task state: ${snapshot.state}');
                      print(
                          'Progress: ${(snapshot.bytesTransferred / snapshot.totalBytes) * 100} %');
                    }, onError: (e) {
                      // The final snapshot is also available on the task via `.snapshot`,
                      // this can include 2 additional states, `TaskState.error` &amp; `TaskState.canceled`
                      print(task.snapshot);
  
                      if (e.code == 'permission-denied') {
                        print(
                            'User does not have permission to upload to this reference.');
                      }
                    });
                  }
                },
                child: Text(&quot;Track Title&quot;)),
  </code></pre>