TypeChecker.typeNamed constructor
Creates a new TypeChecker that can check against the given type.
Creates a new TypeChecker using a runtime Type object (for example
TypeChecker.typeNamed(Foo)). This is useful when you have a concrete
Type at runtime and want to treat it as a static type reference. You
can optionally restrict the checker to types declared in a specific
package via inPackage, or indicate that the type comes from the SDK
using inSdk.
Implementation
const factory TypeChecker.typeNamed(
Type type, {
String? inPackage,
bool? inSdk,
}) = _NameTypeChecker;