getUriProductHelper static method
Implementation
static UriProductHelper getUriProductHelper({
required ProductType? productType,
}) {
final UriProductHelper currentUriProductHelper = _uriProductHelper;
if (productType == null) {
return currentUriProductHelper;
}
final ProductType? currentProductType = extractProductType(
currentUriProductHelper,
);
if (currentProductType == null) {
return currentUriProductHelper;
}
if (currentProductType == productType) {
return currentUriProductHelper;
}
return UriProductHelper(
domain: currentUriProductHelper.domain.replaceFirst(
currentProductType.getDomain(),
productType.getDomain(),
),
);
}