dart - How do I get query parameters in the URL -


I am working on a web game in Dart. In this I need a function where I can get data from the URL, in the same way that you will get it in PHP. How do i do this

For example, when I load my web game: ? Id = 15 & randomNumber = 3.14 , for example, add the following to your URL. How can I get them into a raw string (favorite) in Dart or any other format?

You can use ur class from dart: core

I.e.:

  main () {print (URI.base.toString ()); // http: // localhost: 8082 / game.html? Id = 15 & randomNumber = 3.14 print (Uri.base.query); // id = 15 & randomNumber = 3.14 print (Uri.base.queryParameters ['randomNumber']); // 3.14}  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -