[linter request] Don't use a non-nullable casting type when combined with conditional member access #59805
Labels
analyzer-linter
Issues with the analyzer's support for the linter package
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
type-enhancement
A request for a change that isn't a bug
Dart should have a lint to ensure that users who combine conditional access and casting that the casting type is nullable. An alternative solution would be to have the user switch to using the bang (!) operator instead to show intent.
BAD:
GOOD:
The text was updated successfully, but these errors were encountered: