Group: style

Maturity: stable

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

Since info is static, may be stale

View all Lint Rules

Using the Linter

DO declare method return types.

When declaring a method or function always specify a return type. Declaring return types for functions helps improve your codebase by allowing the analyzer to more adequately check your code for errors that could occur during runtime.


main() { }

_bar() => _Foo();

class _Foo {
  _foo() => 42;


void main() { }

_Foo _bar() => _Foo();

class _Foo {
  int _foo() => 42;

typedef predicate = bool Function(Object o);