Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit 201fd3b

Browse files
authoredSep 1, 2022
re-add isClass (#3641)
1 parent ebd2ede commit 201fd3b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎lib/src/util/dart_type_utilities.dart

+7
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,13 @@ class DartTypeUtilities {
241241
DartType? type, String interface, String library) =>
242242
type.implementsInterface(interface, library);
243243

244+
// todo(pq): remove and replace w/ an extension (pending internal migration)
245+
@Deprecated('Slated for removal')
246+
static bool isClass(DartType? type, String? className, String? library) =>
247+
type is InterfaceType &&
248+
type.element2.name == className &&
249+
type.element2.library.name == library;
250+
244251
@Deprecated('Replace with `expression.isNullLiteral`')
245252
static bool isNullLiteral(Expression? expression) => expression.isNullLiteral;
246253

0 commit comments

Comments
 (0)