isScheme method

  1. @override
bool isScheme(
  1. String scheme
)
override

Whether the scheme of this Uri is scheme.

The scheme should be the same as the one returned by Uri.scheme, but doesn't have to be case-normalized to lower-case characters.

Example:

var uri = Uri.parse('http://example.com');
print(uri.isScheme('HTTP')); // true

final uriNoScheme = Uri(host: 'example.com');
print(uriNoScheme.isScheme('HTTP')); // false

An empty scheme string matches a URI with no scheme (one where hasScheme returns false).

Implementation

@override
bool isScheme(String scheme) => _delegate.isScheme(scheme);