uriPath property

String uriPath
inherited

URI path

Implementation

// TODO: Apply proper percent-encoding
String get uriPath =>
    getOptions(OptionType.uriPath)
        ?.map((final e) => e.stringValue.replaceAll('/', '%2F'))
        .join('/') ??
    '';
void uriPath=(String fullPath)
inherited

Sets a number of Uri path options from a string

Implementation

set uriPath(final String fullPath) {
  clearUriPath();

  var trimmedPath = fullPath;

  if (fullPath.startsWith('/')) {
    trimmedPath = fullPath.substring(1);
  }

  if (trimmedPath.isEmpty) {
    return;
  }

  trimmedPath.split('/').forEach(addUriPath);
}