'How to shorten url in Flutter?

Let's say i have a Firebase Storage url that looks like this :

https://firebasestorage.googleapis.com/v0/b/project-id.appspot.com/o/public%2FNyq7dMqe2kcAZGE71YwZ5fsAkV83%2Fphoto_profile?alt=media&token=c78b03fa-b6e4-45a2-90d7-fca917e3c0b4

I am looking for an output that would give for example :

https://hostname.com/random_id

I am aware that firebase_dynamic_links allows to shorten urls, is it a correct solution ?

If yes, how can i do that with my example please ?



Solution 1:[1]

Actually Firebase Dynamic Links would be a nice one solution for your situation.

You can make it runs following these instructions in this article from Medium, I have just implemented it in one of my Apps and it worked as expected.

I hope it helps you and everyone having the same issue.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 GaelCodes