File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -385,6 +385,11 @@ abstract class InterfaceType implements ParameterizedType {
385385 /// with the given name.
386386 MethodElement ? getMethod (String name);
387387
388+ /// Return the element representing the method with the given [name] that is
389+ /// declared in this class, or `null` if this class does not declare a method
390+ /// with the given name.
391+ MethodElement2 ? getMethod2 (String name);
392+
388393 /// Return the element representing the setter with the given [name] that is
389394 /// declared in this class, or `null` if this class does not declare a setter
390395 /// with the given name.
Original file line number Diff line number Diff line change @@ -905,6 +905,11 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
905905 MethodElement ? getMethod (String methodName) =>
906906 MethodMember .from (element.getMethod (methodName), this );
907907
908+ @override
909+ MethodElement2 ? getMethod2 (String methodName) {
910+ return getMethod (methodName)? .asElement2;
911+ }
912+
908913 @override
909914 PropertyAccessorElement ? getSetter (String setterName) =>
910915 PropertyAccessorMember .from (element.getSetter (setterName), this );
Original file line number Diff line number Diff line change @@ -375,12 +375,6 @@ extension InterfaceElementExtension on InterfaceElement {
375375 }
376376}
377377
378- extension InterfaceTypeExtension on InterfaceType {
379- MethodElement2 ? getMethod2 (String name) {
380- return getMethod (name)? .asElement2;
381- }
382- }
383-
384378extension LabelElement2Extension on LabelElement2 {
385379 LabelElement get asElement {
386380 return firstFragment as LabelElement ;
You can’t perform that action at this time.
0 commit comments