isExpressionExactlyType function
Implementation
bool isExpressionExactlyType(
Expression expression,
String typeName,
String packageName,
) {
if (expression.staticType case final type?) {
return TypeChecker.fromName(
typeName,
packageName: packageName,
).isExactlyType(type);
}
return false;
}