isStyleUrlResolvable function

bool isStyleUrlResolvable(
  1. String? url
)

Whether url resides within the current package or a dependency.

Implementation

bool isStyleUrlResolvable(String? url) {
  if (url == null || url.isEmpty || url[0] == '/') return false;
  var schemeMatch = _urlWithSchemaRe.firstMatch(url);
  return schemeMatch == null ||
      schemeMatch[1] == 'package' ||
      schemeMatch[1] == 'asset';
}