Answers for "dart uri from string"

1

dart uri from string

void main(){
    
var uri =
    Uri.parse('https://example.org:8080/foo/bar#frag');
  
assert(uri.scheme == 'https');
assert(uri.host == 'example.org');
assert(uri.path == '/foo/bar');
assert(uri.fragment == 'frag');
print(uri.origin == 'https://example.org:8080');
}
Posted by: Guest on April-08-2021

Browse Popular Code Answers by Language