avoid_return_types_on_setters

Group: style

Maturity: stable

Dart SDK: >= 2.0.0 • (Linter v0.1.11)

flutter pedantic

View the Project on GitHub dart-lang/linter

AVOID return types on setters.

As setters do not return a value, declaring the return type of one is redundant.

GOOD:

set speed(int ms);

BAD:

void set speed(int ms);