title: How to delete file from Firebase Storage in Flutter
body: <p>I tried the example from this post <a href="https://stackoverflow.com/questions/54170250/how-to-delete-a-firebase-storage-file-with-flutter/59890430?noredirect=1#comment105909520_59890430">How to delete a Firebase Storage file with flutter?</a></p>
  
  <p>But it did not work. Here's what I tried:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>String filePath = 'https://firebasestorage.googleapis.com/v0/b/amct-47348.appspot.com/o/ClassificadoImages%2F1579839318515.jpg?alt=media&amp;token=cd8880eb-8b37-45e4-8dc1-e75de0c5f7cb'
    .replaceAll(new RegExp(r 'https://firebasestorage.googleapis.com/v0/b/amct-47348.appspot.com/o/ClassificadoImages%2F'), '').split('?')[0];
  
  FirebaseStorage.instance.ref().child(filePath).delete()
    .then((_) {
      print('Successfully deleted $filePath storage item');
    }).catchError((e) {
      print("err: $e");
    });</code></pre>
  </div>
  </div>
  </p>
  
  <p>And this what it returned:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>I / flutter(4920): err: PlatformException(deletion_error, Object does not exist at location., null)</code></pre>
  </div>
  </div>
  </p>
  
  <p>Could use some ideas on why it returns an error, since it's exactly like the example. Thanks for reading.</p>