BACK TO LIST

Dart rules

Codiga provides multiple sets of rules for 12+ languages. Below we provide a link and a description for all the rules supported by our platform. Note that not all the rules are being listed and described below.

ALWAYS_DECLARE_RETURN_TYPES

Code style
Error

Method should have return type

AVOID_PRINT

Code style
Error

Avoid `print` calls in production code.

ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE

Code style
Error

Illegal assignment to non-assignable expression.

MISSING_ASSIGNABLE_SELECTOR

Code style
Error

Missing selector

MISSING_REQUIRED_ARGUMENT

Code style
Error

Missing required argument

NO_DEFAULT_SUPER_CONSTRUCTOR

Code style
Error

No default super constructor

PREFER_CONST_DECLARATIONS

Code style
Error

Prefer const over final for declarations

PREFER_FINAL_LOCALS

Code style
Error

Prefer final for variable declarations if they are not reassigned.

REDIRECT_TO_NON_CLASS

Code style
Error

Name isn't a type and can't be used in a redirected constructor.

SORT_CHILD_PROPERTIES_LAST

Code style
Error

Sort child properties last in widget instance creations.

TYPE_ANNOTATE_PUBLIC_APIS

Code style
Error

Type annotate public APIs.

TYPE_ARGUMENT_NOT_MATCHING_BOUNDS

Code style
Error

Type arguments do not match bounds

UNDEFINED_OPERATOR

Code style
Error

Undefined operator

UNNECESSARY_THIS

Code style
Error

Unecessary this

UNSUPPORTED_OPERATOR

Code style
Error

The '===' operator is not supported

USE_OF_VOID_RESULT

Code style
Error

Use of void results

We use cookies to improve your site experience, including analytics cookies to understand how you use our product and design better experiences. Please read our Cookie Policy.