avoid_unnecessary_return_variable
An avoid_unnecessary_return_variable
rule which forbids returning
an immutable variable if it can be rewritten in return statement itself.
See more here: https://github.com/solid-software/solid_lints/issues/92
Example
BAD:
void x() {
final y = 1;
return y;
}
GOOD:
void x() {
return 1;
}