public string GetIconUrlString(Package package)
        {
            if (package == null)
            {
                throw new ArgumentNullException(nameof(package));
            }

            var hasExternalIconUrlSpecified = !string.IsNullOrWhiteSpace(package.IconUrl);

            if (package.HasEmbeddedIcon || (_featureFlagService.IsForceFlatContainerIconsEnabled() && hasExternalIconUrlSpecified))
            {
                // never fall back to iconUrl in this case
                return(GetIconUrlFromTemplate(package));
            }
            else
            {
                if (!hasExternalIconUrlSpecified)
                {
                    return(null);
                }

                return(package.IconUrl);
            }
        }