[x] List any existing rules this proposal modifies, complements, overlaps or conflicts with.
[x] List any relevant issues (reported here, the SDK Tracker, or elsewhere).
[x] If there's any prior art (e.g., in other linters), please add references here.
[x] If this proposal corresponds to Effective Dart or Flutter Style Guide advice, please call it out. (If there isn't any corresponding advice, should there be?)
[x] If this proposal is motivated by real-world examples, please provide as many details as you can. Demonstrating potential impact is especially valuable.
I don't see a lot of win here. It has 0 false positives, but it's not very exciting. I don't think this would be worth the maintenance cost or performance cost.
avoid_unnecessary_return
Description
As mentioned in https://github.com/flutter/flutter/pull/114290#issuecomment-1297514968, it would be great to have a linter to catch:
Realworld example: https://github.com/flutter/flutter/pull/114290
Details
see above
Kind
style?
Good Examples
see above
Bad Examples
see above
Discussion
Add any other motivation or useful context here.
Discussion checklist