“Dart Uri” Kode Jawaban

Dart Uri

var httpsUri = Uri(
    scheme: 'https',
    host: 'dart.dev',
    path: '/guides/libraries/library-tour',
    fragment: 'numbers');
print(httpsUri); // https://dart.dev/guides/libraries/library-tour#numbers

httpsUri = Uri(
    scheme: 'https',
    host: 'example.com',
    path: '/page/',
    queryParameters: {'search': 'blue', 'limit': '10'});
print(httpsUri); // https://example.com/page/?search=blue&limit=10

final mailtoUri = Uri(
    scheme: 'mailto',
    path: '[email protected]',
    queryParameters: {'subject': 'Example'});
print(mailtoUri); // mailto:[email protected]?subject=Example
Raj Prajapati

Dart Uri

var httpsUri = Uri(
    scheme: 'https',
    host: 'dart.dev',
    path: '/guides/libraries/library-tour',
    fragment: 'numbers');
print(httpsUri); // https://dart.dev/guides/libraries/library-tour#numbers

httpsUri = Uri(
    scheme: 'https',
    host: 'example.com',
    path: '/page/',
    queryParameters: {'search': 'blue', 'limit': '10'});
print(httpsUri); // https://example.com/page/?search=blue&limit=10

final mailtoUri = Uri(
    scheme: 'mailto',
    path: '[email protected]',
    queryParameters: {'subject': 'Example'});
print(mailtoUri); // mailto:[email protected]?subject=Example
Raj Prajapati

Jawaban yang mirip dengan “Dart Uri”

Pertanyaan yang mirip dengan “Dart Uri”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya