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