isOfType<U> method
An alias for type.acceptsInstance(this)
.
This makes RuntimeType.acceptsInstance appear like the is
operator. Instead of
type.acceptsInstance(instance)
, use instance.isOfType(type)
.
Implementation
bool isOfType<U>(RuntimeType<U> type) => type.acceptsInstance(this);