isSubdomainOf static method
Checks if a URL is a subdomain of another.
Both URLs are parsed to PublicSuffix objects, which are then compared using PublicSuffix.isSubdomainOf().
Throws a StateError if SuffixRules has not been initialised.
Implementation
static bool isSubdomainOf(Uri potentialSub, Uri root, {bool icann = false}) {
var parsedUrl = PublicSuffix(url: potentialSub);
var parsedRoot = PublicSuffix(url: root);
return parsedUrl.isSubdomainOf(parsedRoot, icann: icann);
}