urlencoding in Dart

后端 未结 5 2099
鱼传尺愫
鱼传尺愫 2020-12-01 13:31

Is there a function to do urlencoding in Dart? I am doing a AJAX call using XMLHttpRequest object and I need the url to be url encoded.

I did a search on dartlang.or

5条回答
  •  醉话见心
    2020-12-01 14:14

    Uri.encodeComponent(url); // To encode url
    Uri.decodeComponent(encodedUrl); // To decode url
    

提交回复
热议问题