locationPath property

String locationPath
inherited

Location path as a string

Implementation

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

Set the location path from a string

Implementation

set locationPath(final String fullPath) {
  clearLocationPath();

  var trimmedPath = fullPath;

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

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