Linter rules
Declare method return types.
Separate the control structure expression from its statement.
Put required named parameters first.
Specify @required on named parameters without defaults.
Specify type annotations.
Avoid relative imports for files in lib/.
Annotate overridden members.
Annotate redeclared members.
Avoid annotating with dynamic when not required.
Avoid bool literals in conditional expressions.
Avoid catches without on clauses.
Don't explicitly catch Error or types that implement it.
Avoid defining a class that contains only static members.
Avoid double and int checks.
Avoid method calls or property accesses on a dynamic target.
Avoid empty statements in else clauses.
build circles thumb_up flutter
Avoid overloading operator == and hashCode on classes not marked @immutable.
Avoid escaping inner quotes by converting surrounding quotes.
Avoid field initializers in const classes.
Avoid final for parameter declarations.
Avoid using forEach with a function literal.
Avoid using 'FutureOr' as the type of a result.
Don't implement classes that override ==.
Don't explicitly initialize variables to null.
Avoid JavaScript rounded ints.
Don't declare multiple variables on a single line.
Don't check for null in custom == operators.
Avoid positional boolean parameters.
Avoid print calls in production code.
Avoid private typedef functions.
Avoid redundant argument values.
Avoid relative imports for files in lib/.
build circles thumb_up flutter
Don't rename parameters of overridden methods.
Avoid return types on setters.
Avoid returning null from members whose return type is bool, double, int, or num.
Avoid returning null for Future.
Avoid returning null for void.
Avoid returning this from methods just to enable a fluent interface.
Avoid setters without getters.
Avoid shadowing type parameters.
Avoid single cascade in expression statements.
Avoid slow asynchronous dart:io methods.
Avoid .toString() in production code since results may be minified.
Avoid types as parameter names.
Avoid annotating types for function expression parameters.
Avoid unnecessary containers.
Avoid overriding a final field to return different values if called multiple times.
Avoid defining unused parameters in constructors.
Avoid async functions that return void.
Avoid using web-only libraries outside Flutter web plugin packages.
Await only futures.
build circles thumb_up flutter
Name extensions using UpperCamelCase.
Name types using UpperCamelCase.
Cancel instances of dart:async StreamSubscription.
Cascade consecutive method invocations on the same reference.
Don't cast a nullable value to a non nullable type.
Close instances of dart:core Sink.
Sort combinator names alphabetically.
Missing conditional import.
Prefer using lowerCamelCase for constant names.
Avoid control flow in finally blocks.
DO use curly braces for all flow control structures.
build circles thumb_up flutter
Depend on referenced packages.
Missing deprecated annotation.
Avoid using deprecated elements from within the package in which they are declared.
DO reference all public properties in debug methods.
Adhere to Effective Dart Guide directives sorting conventions.
There should be no Future-returning calls in synchronous functions unless they are assigned or returned.
Do not use environment declared variables.
Document ignore comments.
Avoid empty catch blocks.
build circles thumb_up flutter
Use ; instead of {} for empty constructor bodies.
Avoid empty statements.
Do use sound null safety.
Put a single newline at end of file.
Define case clauses for all constants in enum-like classes.
Name source files using lowercase_with_underscores.
Use Flutter TODO format: // TODO(username): message, https://URL-to-issue.
Always override hashCode if overriding ==.
build circles thumb_up flutter
Don't import implementation files from another package.
Explicitly tear-off call methods when using an object as a Function.
build circles thumb_up flutter
Don't implicitly reopen classes.
Use case expressions that are valid in Dart 3.0.
Avoid runtime type tests with JS interop types where the result may not be platform-consistent.
Conditions should not unconditionally evaluate to true or to false.
Join return statement with assignment when possible.
Start multiline strings with a newline.
Attach library annotations to library directives.
build circles thumb_up flutter
Name libraries using lowercase_with_underscores.
Use lowercase_with_underscores when specifying a library prefix.
Avoid using private types in public APIs.
Avoid lines longer than 80 characters.
Boolean expression composed only with literals.
Use matching super parameter names.
Missing whitespace between adjacent strings.
Don't use adjacent strings in list.
No default cases.
Don't use more than one case with same value.
build circles thumb_up flutter
Avoid leading underscores for library prefixes.
Avoid leading underscores for local identifiers.
Don't compare boolean expressions to boolean literals.
Don't put any logic in createState.
Avoid calling toString() on runtimeType.
Don't assign a variable to itself.
Don't use wildcard parameters or variables.
Name non-constant identifiers using lowerCamelCase.
build circles thumb_up flutter
Noop primitive operations.
Don't use null check on a potentially nullable type parameter.
build circles thumb_up flutter
Do not pass null as an argument where a closure is expected.
Omit type annotations for local variables.
Omit obvious type annotations for local variables.
Omit obvious type annotations for top-level and static variables.
Avoid defining a one-member abstract class when a simple function will do.
Only throw instances of classes extending either Exception or Error.
Don't override fields.
Provide doc comments for all public APIs.
Use lowercase_with_underscores for package names.
Prefix library names with the package name and a dot-separated path.
Don't reassign references to parameters of functions or methods.
Use adjacent strings to concatenate string literals.
Prefer putting asserts in initializer lists.
Prefer asserts with message.
Prefer using a boolean as the assert condition.
Use collection literals when possible.
Prefer using ??= over testing for null.
Prefer const with constant constructors.
Prefer declaring const constructors on @immutable classes.
Prefer const over final for declarations.
Prefer const literals as parameters of constructors on @immutable classes.
Prefer defining constructors instead of static methods to create instances.
Use contains for List and String instances.
Prefer double quotes where they won't require escape sequences.
Use = to separate a named parameter from its default value.
Use => for short members whose body is a single return statement.
Private field could be final.
Prefer final in for-each loop variable if reference is not reassigned.
Prefer final for variable declarations if they are not reassigned.
Prefer final for parameter declarations if they are not reassigned.
Prefer for elements when building maps from iterables.
Use forEach to only apply a function to all the elements.
Use a function declaration to bind a function to a name.
Prefer generic function type aliases.
build circles thumb_up flutter
Prefer if elements to conditional expressions where possible.
Prefer using ?? operators.
Use initializing formals when possible.
Inline list item declarations where possible.
Prefer int literals over double literals.
Use interpolation to compose strings and values.
Use isEmpty for Iterables and Maps.
build circles thumb_up flutter
Use isNotEmpty for Iterables and Maps.
build circles thumb_up flutter
Prefer is! operator.
Prefer to use whereType on iterable.
build circles thumb_up flutter
Prefer using mixins.
Prefer null-aware method calls.
Prefer using null-aware operators.
Prefer relative imports for files in lib/.
Only use double quotes for strings containing single quotes.
Use spread collections when possible.
Prefer typing uninitialized variables and fields.
build circles thumb_up flutter
Don't use the Null type, unless you are positive that you don't want void.
Provide a deprecation message, via @Deprecated("message").
Document all public members.
Property getter recursively returns itself.
Deprecation in major version.
Use trailing commas for all parameter lists and argument lists.
Use secure urls in pubspec.yaml.
Avoid unnecessary member names in variable patterns.
SizedBox for whitespace.
Use SizedBox shrink and expand named constructors.
Sort child properties last in widget instance creations.
Sort constructor declarations before other members.
Sort pub dependencies alphabetically.
Sort unnamed constructor declarations first.
Specify non-obvious type annotations for local variables.
Specify non-obvious type annotations for top-level and static variables.
Specify type annotations.
build circles thumb_up flutter
Place the super call last in a constructor initialization list.
Avoid switch statements on a 'Type'.
Test type of argument in operator ==(Object other).
Avoid throw in finally block.
Tighten type of initializing formal.
Type annotate public APIs.
Don't type annotate initializing formals.
Don't use constant patterns with type literals.
build circles thumb_up flutter
Future results in async function bodies must be awaited or marked
unawaited using dart:async.
No await no async.
Unnecessary await keyword in return.
Avoid using braces in interpolation when not needed.
Don't use explicit breaks when a break is implied.
Avoid const keyword.
Unnecessary .new constructor name.
Don't use final for local variables.
Avoid wrapping fields in getters and setters just to be "safe".
Don't ignore a diagnostic code that is not produced.
Don't create a lambda when a tear-off will do.
Don't specify the late modifier when it is not needed.
Avoid library directives unless they have documentation comments or annotations.
Don't have a library name in a library declaration.
Unnecessary new keyword.
Avoid null in null-aware assignment.
Unnecessary null aware operator on extension on a nullable type.
Unnecessary null checks.
Avoid using null in ?? operators.
Use a non-nullable type for a final variable initialized with a non-nullable value.
Don't override a method to do a super method invocation with the same parameters.
build circles thumb_up flutter
Unnecessary parentheses can be removed.
Unnecessary raw string.
Avoid using unnecessary statements.
Remove unnecessary backslashes in strings.
Unnecessary string interpolation.
Don't access members with this unless avoiding shadowing.
Unnecessary toList() in spreads.
Unnecessary use of 'unawaited'.
Unnecessary underscores can be removed.
Unreachable top-level members in executable libraries.
Avoid unsafe HTML APIs.
Unsafe type: Has a type variable in a non-covariant position.
Do not use BuildContext across asynchronous gaps.
Use ColoredBox.
Use DecoratedBox.
Use enums rather than classes that behave like enums.
Prefer an 8-digit hexadecimal integer (for example, 0xFFFFFFFF) to instantiate a Color.
Use generic function type syntax for parameters.
Use ?? operators to convert nulls to bools.
Prefer intValue.isOdd/isEven instead of checking the result of % 2.
Use late for private members with a non-nullable type.
Use predefined named constants.
If-elements testing for null can be replaced with null-aware elements.
Use raw string to avoid escapes.
Use rethrow to rethrow a caught exception.
Use a setter for operations that conceptually change a property.
Use string buffers to compose strings.
Use string in part of directives.
build circles thumb_up flutter
Use super-initializer parameters where possible.
science build thumb_up flutter
Use throwsA matcher instead of fail().
Start the name of the method with to/_to or as/_as if applicable.
Use truncating division.
Use valid regular expression syntax.
Don't assign to void.