diff --git a/dev/bots/custom_rules/render_box_intrinsics.dart b/dev/bots/custom_rules/render_box_intrinsics.dart index b5890e7695..9b0d869239 100644 --- a/dev/bots/custom_rules/render_box_intrinsics.dart +++ b/dev/bots/custom_rules/render_box_intrinsics.dart @@ -115,7 +115,7 @@ class _RenderBoxSubclassVisitor extends RecursiveAstVisitor { if (isCallingSuperImplementation) { return; } - final Element? declaredInClassElement = node.staticElement?.declaration?.enclosingElement; + final Element? declaredInClassElement = node.staticElement?.declaration?.enclosingElement3; if (declaredInClassElement is InterfaceElement && _implementsRenderBox(declaredInClassElement)) { violationNodes.add((node, correctMethodName));