We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0aa15fd commit 5e37b83Copy full SHA for 5e37b83
tools/analyzer_plugin/lib/src/util/prop_forwarding/forwarded_props.dart
@@ -76,7 +76,12 @@ ForwardedProps? computeForwardedProps(FluentComponentUsage usage) {
76
final methodName = invocation.methodName.name;
77
final arg = invocation.node.argumentList.arguments.firstOrNull;
78
79
- // FIXME what should we do about the second condition arg for addProps?
+ if (methodName == 'addProps' || methodName == 'modifyProps') {
80
+ // If props are conditionally forwarded, don't count them.
81
+ final hasConditionArg = invocation.node.argumentList.arguments.length > 1;
82
+ if (hasConditionArg) continue;
83
+ }
84
+
85
final isAddAllOrAddProps = methodName == 'addProps' || methodName == 'addAll';
86
87
// ..addProps(props)
0 commit comments