[Property Editor] Handle deprecated widget arguments#9062
[Property Editor] Handle deprecated widget arguments#9062elliette merged 3 commits intoflutter:masterfrom
Conversation
| } | ||
| } | ||
|
|
||
| bool notDeprecatedWithNoValue(EditableArgument argument) => |
There was a problem hiding this comment.
nit: consider making this function phrased in the positive deprecatedAndNotSet and then negate it where you call the method. I think this would make it easier to read rather than having to mentally parse the negatives.
There was a problem hiding this comment.
It actually seems like the case we want to check for is deprecatedAndSet right? and then we only include properties that are either not deprecated or deprecatedAndSet?
There was a problem hiding this comment.
Haha yeah, I removed this method and just added the filter condition inline to where we actually filter out the deprecated properties. I think with a comment this is more clear than trying to come up with a descriptive method name:
// Filter out any deprecated properties that aren't set.
.where((property) => !property.isDeprecated || property.hasArgument)
Fixes #8930