Merge pull request #1809 from dart-lang/update_api_calls

update typeParam access
diff --git a/lib/src/rules/always_specify_types.dart b/lib/src/rules/always_specify_types.dart
index 77a2a2f..f6ea07e 100644
--- a/lib/src/rules/always_specify_types.dart
+++ b/lib/src/rules/always_specify_types.dart
@@ -127,7 +127,7 @@
   visitNamedType(NamedType namedType) {
     DartType type = namedType.type;
     if (type is InterfaceType) {
-      if (type.typeParameters.isNotEmpty &&
+      if (type.element.typeParameters.isNotEmpty &&
           namedType.typeArguments == null &&
           namedType.parent is! IsExpression &&
           !_isOptionallyParameterized(type)) {
diff --git a/lib/src/util/flutter_utils.dart b/lib/src/util/flutter_utils.dart
index 15b8dd9..729f491 100644
--- a/lib/src/util/flutter_utils.dart
+++ b/lib/src/util/flutter_utils.dart
@@ -28,7 +28,7 @@
   }
   if (type is InterfaceType &&
       DartTypeUtilities.implementsAnyInterface(type, _collectionInterfaces)) {
-    return type.typeParameters.length == 1 &&
+    return type.element.typeParameters.length == 1 &&
         isWidgetProperty(type.typeArguments.first);
   }
   return false;