1

I want to pass a list in a deep link in flutter link strings, int, etc but I am not sure about it. Is it possible to pass a list through a deep link in the same way? Or there is another way to do that?

Thanks in advance!

Akif
  • 7,098
  • 7
  • 27
  • 53
Jagadish
  • 1,005
  • 11
  • 30

1 Answers1

0

Dynamic links only allow you to pass certain values and they are already well documented in the plugin.

For custom values, you could encode the list directly into the URL as a query value and then parse them out in the app before using it. If the list is not small enough to do that, you could just create a uuid and store the list with it as key-value pairs in a DB (could be firestore if you're using firebase), and then pass that uuid as part of the URL in the deep link. And yes, parse them out before using it.

Frenco
  • 1,299
  • 1
  • 8
  • 25
  • Ok so I can pass a small list as deep link parameter right? – Jagadish Dec 06 '20 at 14:49
  • Technically yes, but since the URL is a string, encode the list first. You could just do that by `join`ing the list if the list contains only strings. Then you could just get that URL query and split it to get a `List` in the app. – Frenco Dec 06 '20 at 14:53
  • Yes it contains only strings but how to split and get list while retrieving the list and what's the procedure while creating dynamic link ? – Jagadish Dec 06 '20 at 14:55
  • ;) do some research a bit to understand the full picture yourself. I've given a solution, and StackOverflow is not a code writing service. – Frenco Dec 06 '20 at 15:11