DHUUriEx extension

Extensions for Uri utils and manipulation.

on

Properties

domainName String

Available on Uri, provided by the DHUUriEx extension

Extracts the domain name from a URL. Supports URLs with or without 'www' and different TLDs.
no setter

Methods

appendPathSegment(String segment) Uri

Available on Uri, provided by the DHUUriEx extension

Returns a new Uri with segment appended to the path.
appendPathSegments(Iterable<String> segments) Uri

Available on Uri, provided by the DHUUriEx extension

Returns a new Uri with segments appended to the path.
mergeQueryParameters(Map<String, Object?> queryParameters) Uri

Available on Uri, provided by the DHUUriEx extension

Returns a new Uri with queryParameters merged into existing parameters.
normalizeTrailingSlash({bool trailingSlash = true}) Uri

Available on Uri, provided by the DHUUriEx extension

Normalizes the trailing slash in the path.
rebuild({String? schemeBuilder(String current)?, String? userInfoBuilder(String current)?, String? hostBuilder(String current)?, int? portBuilder(int current)?, String? pathBuilder(String current)?, Iterable<String>? pathSegmentsBuilder(Iterable<String> current)?, String? queryBuilder(String current)?, Map<String, dynamic>? queryParametersBuilder(Map<String, dynamic> current)?, String? fragmentBuilder(String current)?}) Uri

Available on Uri, provided by the DHUUriEx extension

Creates a new Uri based on this one by applying builder functions to individual components.
removeQueryParameters(Iterable<String> keys) Uri

Available on Uri, provided by the DHUUriEx extension

Returns a new Uri with the provided keys removed from query parameters.
withQueryParameters(Map<String, Object?> queryParameters) Uri

Available on Uri, provided by the DHUUriEx extension

Returns a new Uri with query parameters replaced by queryParameters.