How to receive/fetch url parameter (get request) in flutter web?

250

Try Uri.base.queryParameters it returns a Map, so you can do Uri.base.queryParameters['id'] and it will return the value

Share:
250
Edin
Author by

Edin

this user dont like to add info about them.

Updated on December 21, 2022

Comments

  • Edin
    Edin over 1 year

    I am using a script by exporting it with flutter for the web. There I need to put something over an URL slug into a field via a get request.

    Example:

    www.url.de/?id=123 
    

    here I need to put "123" into the field.

    How can I read this 123 out of the URL with Flutter Web?