| Index: lib/src/utils.dart
|
| diff --git a/lib/src/utils.dart b/lib/src/utils.dart
|
| index 4c7339520c673f724b77c967c1d74164a4615bbe..9f21703d7deae66f079227fafa1807afc6f289ae 100644
|
| --- a/lib/src/utils.dart
|
| +++ b/lib/src/utils.dart
|
| @@ -207,8 +207,15 @@ _MemberTypeGetter _memberTypeGetter(ExecutableElement member) {
|
| return f;
|
| }
|
|
|
| -bool isDynamicTarget(Expression node) =>
|
| - node != null && !isLibraryPrefix(node) && node.staticType.isDynamic;
|
| +bool isDynamicTarget(Expression node) {
|
| + if (node == null) return false;
|
| + var type = node.staticType;
|
| +
|
| + // This is an unknown identifier, like an import that doesn't resolve.
|
| + if (type == null) return true;
|
| +
|
| + return type.isDynamic && !isLibraryPrefix(node);
|
| +}
|
|
|
| bool isLibraryPrefix(Expression node) =>
|
| node is SimpleIdentifier && node.staticElement is PrefixElement;
|
|
|