Don't put any logic in createStateDRT-W1023Don't assign a variable to itselfDRT-W1024Don't use wildcard parameters or variablesDRT-W1025Don't use the Null type, unless you are positive that you don't want voidDRT-W1027Separate the control structure expression from its statementDRT-W1041Avoid unnecessary containersDRT-W1072Avoid empty else statementsDRT-W1003Avoid final for parameter declarationsDRT-W1054Sort combinator names alphabeticallyDRT-W1080Avoid `print` calls in production codeDRT-W1004Don't use more than one case with same valueDRT-W1022Sort pub dependencies alphabeticallyDRT-W1039Avoid bool literals in conditional expressionsDRT-W1046Avoid shadowing type parametersDRT-W1069Name extensions using UpperCamelCaseDRT-W1076Prefer using lowerCamelCase for constant namesDRT-W1082Attach library doc comments to library directivesDRT-W1084Deprecated member used in the same packageDRT-W1015Prefer relative imports for files in `lib/`DRT-W1026Avoid relative imports for files in `lib/`DRT-W1001Avoid slow async `dart:io` methodsDRT-W1006Avoid <Type>.toString() in production code since results may be minifiedDRT-W1007Avoid types as parameter namesDRT-W1008Avoid using web-only libraries outside Flutter web plugin packagesDRT-W1009Cancel instances of dart.async.StreamSubscriptionDRT-W1010Close instances of `dart.core.Sink`DRT-W1011Put required named parameters firstDRT-W1042Only reference in scope identifiers in doc commentsDRT-W1013Avoid control flow in finally blocksDRT-W1014DO reference all public properties in debug methodsDRT-W1016Don't invoke asynchronous functions in non-async blocksDRT-W1017Avoid empty statementsDRT-W1018Boolean expression composed only with literalsDRT-W1020Don't use adjacent strings in listDRT-W1021Test type arguments in operator ==(Object other)DRT-W1028Avoid `throw` in finally blockDRT-W1029Avoid using unnecessary statementsDRT-W1030Equality operator `==` invocation with references of unrelated typesDRT-W1031Avoid unsafe HTML APIsDRT-W1032Do not use BuildContexts across async gapsDRT-W1033Use key in widget constructorsDRT-W1034Use valid regular expression syntaxDRT-W1035Depend on referenced packagesDRT-W1036Use secure urls in `pubspec.yaml`DRT-W1038Declare method return typesDRT-W1040Avoid relative imports for files in `lib/`DRT-W1005Invocation of various collection methods with arguments of unrelated typesDRT-W1012Specify type annotationsDRT-W1043Annotate overridden membersDRT-W1044Avoid annotating with dynamic when not requiredDRT-W1045Avoid field initializers in const classesDRT-W1053Avoid catches without on clausesDRT-W1047Don't explicitly catch Error or types that implement itDRT-W1048Avoid defining a class that contains only static membersDRT-W1049Avoid double and int checksDRT-W1050Avoid overloading operator == and hashCode on classes not marked `@immutable`DRT-W1051Avoid escaping inner quotes by converting surrounding quotesDRT-W1052Avoid using `forEach` with a function literalDRT-W1055Don't implement classes that override `==`DRT-W1056Don't explicitly initialize variables to nullDRT-W1057Avoid JavaScript rounded intsDRT-W1058Don't declare multiple variables on a single lineDRT-W1059Don't check for null in custom == operatorsDRT-W1060Avoid positional boolean parametersDRT-W1061Avoid private typedef functionsDRT-W1062Avoid redundant argument valuesDRT-W1063Don't rename parameters of overridden methodsDRT-W1064Avoid return types on settersDRT-W1065Avoid setters without gettersDRT-W1068Avoid single cascade in expression statementsDRT-W1070Avoid defining unused parameters in constructorsDRT-W1073Avoid async functions that return voidDRT-W1074Await only futuresDRT-W1075Name types using UpperCamelCaseDRT-W1077Cascade consecutive method invocations on the same referenceDRT-W1078Don't cast a nullable value to a non nullable typeDRT-W1079Missing conditional importDRT-W1081DO use curly braces for all flow control structuresDRT-W1083Missing deprecated annotationDRT-W1085Always override `hashCode` if overriding `==`DRT-W1019Adhere to Effective Dart Guide directives sorting conventionsDRT-W1086Do not use environment declared variablesDRT-W1087Use `lowercase_with_underscores` for package namesDRT-W1037Avoid returning this from methods just to enable a fluent interfaceDRT-W1067Avoid annotating types for function expression parametersDRT-W1071Avoid method calls or property accesses on a "dynamic" targetDRT-W1002Avoid returning null for voidDRT-W1066Use interpolation to compose strings and valuesDRT-W1146Unnecessary new keywordDRT-W1182Missing whitespace between adjacent stringsDRT-W1104Provide doc comments for all public APIsDRT-W1117Parameter type mismatch for constant constructorDRT-W1265Remove deprecated key from `pubspec.yaml`DRT-W1297The operator x ~/ y is more efficient than (x / y).toInt()DRT-W1302Only throw instances of classes extending either Exception or ErrorDRT-W1115Prefer putting asserts in initializer listsDRT-W1121Integer literal exceeds 64-bit representation limitDRT-W1406Prefer final in for-each loop variable if reference is not reassignedDRT-W1134Use a function declaration to bind a function to a nameDRT-W1139Prefer using null aware operatorsDRT-W1153Don't create a lambda when a tear-off will doDRT-W1179Remove unnecessary backslashes in stringsDRT-W1190Unnecessary string interpolationDRT-W1191Unnecessary toList() in spreadsDRT-W1193Prefer intValue.isOdd/isEven instead of checking the result of % 2DRT-W1201Concrete classes can't have 'Enum' as a superinterfaceDRT-W1257Duplicate part directivesDRT-W1312Use `lowercase_with_underscores` when specifying a library prefixDRT-W1100Don't use null check on a potentially nullable type parameterDRT-W1111The 'name' field is required but missingDRT-W1476Prefer using `??=` over testing for nullDRT-W1124Prefer const literals as parameters of constructors on @immutable classesDRT-W1128Prefer to use whereType on iterableDRT-W1150Prefer using mixinsDRT-W1151Sort constructor declarations before other membersDRT-W1165Avoid using `null` in `if null` operatorsDRT-W1185Use if-null operators to convert nulls to boolsDRT-W1200Use a setter for operations that conceptually change a propertyDRT-W1205Invalid assignment of a value marked with `doNotStore`DRT-W1232Invalid usage of non-mixin class as a mixinDRT-W1254An extension override can't be used to access a static member from an extensionDRT-W1349The value of the 'flutter' field is expected to be a mapDRT-W1372Inline function types can't be used for parameters in a generic function typeDRT-W1423Non-type name used as typeDRT-W1538Missing positional arguments in function invocationDRT-W1540Annotation creation must have argumentsDRT-W1545Missing dart libraryDRT-W1470Named parameters can't start with an underscoreDRT-W1578The expression in an assert must be of type 'bool'DRT-W1506Enums can only declare final fieldsDRT-W1526Deferred classes can't be used as superclass constraintsDRT-W1493Avoid empty catch blocksDRT-W1088Prefer const over final for declarationsDRT-W1127Use `;` instead of `{}` for empty constructor bodiesDRT-W1089Put a single newline at end of fileDRT-W1090Define case clauses for all constants in enum-like classesDRT-W1091Name source files using `lowercase_with_underscores`DRT-W1092Use Flutter TODO format: // TODO(username): message, https://URL-to-issueDRT-W1093Don't import implementation files from another packageDRT-W1094Explicitly tear-off `call` methods when using an object as a FunctionDRT-W1095Join return statement with assignment when possibleDRT-W1096Start multiline strings with a newlineDRT-W1097Attach library annotations to library directivesDRT-W1098Name libraries using `lowercase_with_underscores`DRT-W1099Avoid using private types in public APIsDRT-W1101Avoid lines longer than 80 charactersDRT-W1102Use matching super parameter namesDRT-W1103Avoid leading underscores for library prefixesDRT-W1105Avoid leading underscores for local identifiersDRT-W1106Don't compare booleans to boolean literalsDRT-W1107Avoid calling toString() on runtimeTypeDRT-W1108Name non-constant identifiers using lowerCamelCaseDRT-W1109Noop primitive operationsDRT-W1110Do not pass `null` as an argument where a closure is expectedDRT-W1112Omit type annotations for local variablesDRT-W1113Avoid defining a one-member abstract class when a simple function will doDRT-W1114Don't override fieldsDRT-W1116Prefix library names with the package name and a dot-separated pathDRT-W1118Don't reassign references to parameters of functions or methodsDRT-W1119Prefer asserts with messageDRT-W1122Use collection literals when possibleDRT-W1123Prefer const with constant constructorsDRT-W1125Prefer defining constructors instead of static methods to create instancesDRT-W1129Use contains for `List` and `String` instancesDRT-W1130Prefer double quotes where they won't require escape sequencesDRT-W1131Use => for short members whose body is a single return statementDRT-W1132Private field could be finalDRT-W1133Prefer final for variable declarations if they are not reassignedDRT-W1135Prefer final for parameter declarations if they are not reassignedDRT-W1136Prefer 'for' elements when building maps from iterablesDRT-W1137Don't access members with `this` unless avoiding shadowingDRT-W1192Use `forEach` to only apply a function to all the elementsDRT-W1138Prefer generic function type aliasesDRT-W1140Prefer if elements to conditional expressions where possibleDRT-W1141Prefer using if null operatorsDRT-W1142Use initializing formals when possibleDRT-W1143Inline list item declarations where possibleDRT-W1144Prefer int literals over double literalsDRT-W1145Use `isEmpty` for Iterables and MapsDRT-W1147Prefer is! operatorDRT-W1149Prefer null aware method callsDRT-W1152Only use double quotes for strings containing single quotesDRT-W1154Unreachable top-level members in executable librariesDRT-W1194Use spread collections when possibleDRT-W1155Prefer typing uninitialized variables and fieldsDRT-W1156Provide a deprecation message, via @Deprecated("message")DRT-W1157Document all public membersDRT-W1158Property getter recursively returns itselfDRT-W1159Use trailing commas for all function calls and declarationsDRT-W1160SizedBox for whitespaceDRT-W1161Use SizedBox shrink and expand named constructorsDRT-W1162Prefer using /// for doc commentsDRT-W1163Use `ColoredBox`DRT-W1195Sort child properties last in widget instance creationsDRT-W1164Sort unnamed constructor declarations firstDRT-W1166Tighten type of initializing formalDRT-W1167Type annotate public APIsDRT-W1168Don't type annotate initializing formalsDRT-W1169Don't use constant patterns with type literalsDRT-W1170`Future` results in `async` function bodies must be `await`ed or marked `unawaited` using `dart:async`DRT-W1171Unnecessary await keyword in returnDRT-W1172Avoid using braces in interpolation when not neededDRT-W1173Don't use explicit `break`s when a break is impliedDRT-W1174Unnecessary `.new` constructor nameDRT-W1176The keyword 'final' isn't necessary because the parameter is implicitly 'final'DRT-W1177Avoid wrapping fields in getters and setters just to be "safe"DRT-W1178Don't specify the `late` modifier when it is not neededDRT-W1180Unnecessary null aware operator on extension on a nullable typeDRT-W1184Use a non-nullable type for a final variable initialized with a non-nullable valueDRT-W1186Don't override a method to do a super method invocation with the same parametersDRT-W1187Unnecessary parentheses can be removedDRT-W1188Unnecessary raw stringDRT-W1189Use `DecoratedBox`DRT-W1196Use enums rather than classes that behave like enumsDRT-W1197Prefer an 8-digit hexadecimal integer(0xFFFFFFFF) to instantiate ColorDRT-W1198Use predefined named constantsDRT-W1202Use raw string to avoid escapesDRT-W1203Use rethrow to rethrow a caught exceptionDRT-W1204Use string buffers to compose stringsDRT-W1206Use throwsA matcher instead of fail()DRT-W1208Start the name of the method with to/_to or as/_as if applicableDRT-W1209Don't assign to voidDRT-W1210Classes extending 'AbiSpecificInteger' must have exactly one const constructor, no other members, and no type parametersDRT-W1211Types can't be assigned a valueDRT-W1239Classes extending 'AbiSpecificInteger' must have exactly one 'AbiSpecificIntegerMapping' annotation specifying the mapping from ABI to a 'NativeType' integer with a fixed sizeDRT-W1212Classes extending 'AbiSpecificInteger' must have exactly one 'AbiSpecificIntegerMapping' annotation specifying the mapping from ABI to a 'NativeType' integer with a fixed sizeDRT-W1213Invalid mapping type in `AbiSpecificIntegerMapping` annotationDRT-W1214Abstract fields can't have initializersDRT-W1215A 'sealed' class can't be marked 'abstract' because it's already implicitly abstractDRT-W1216Multiple libraries export the same nameDRT-W1218Ambiguous member referenceDRT-W1219Functions can't be assigned a valueDRT-W1237Ambiguous importDRT-W1220The literal can't be either a map or a set because it contains at least one literal map entry or a spread operator spreading a 'Map', and at least one element which is neither of theseDRT-W1221This literal must be either a map or a set, but the elements don't have enough information for type inference to workDRT-W1222Fields in a struct class whose type is 'Pointer' shouldn't have any annotationsDRT-W1223Argument must be a constantDRT-W1224Unassignable argument typeDRT-W1225Methods can't be assigned a valueDRT-W1238Incompatible function signature for `Future.catchError` argumentDRT-W1226A redirecting constructor can't have an 'assert' initializerDRT-W1227Asset directory does not existDRT-W1228Asset does not existDRT-W1229The value of the 'asset' field is expected to be a list of relative file pathsDRT-W1230Assets are required to be file paths (strings)DRT-W1231Constant variables can't be assigned a valueDRT-W1233Invalid setter invocation for final fieldDRT-W1234Final variable cannot be reassignedDRT-W1235Missing setter for getterDRT-W1236The async for-in loop can only be used in an async functionDRT-W1240The 'await' expression can't be used in a 'late' local variable's initializerDRT-W1241Potential implicit return of `null` in method with non-nullable return typeDRT-W1242Invalid return type for `onError` handlerDRT-W1243Missing return statement for nullable return typeDRT-W1244A break label resolves to the 'case' or 'default' statementDRT-W1245Invalid use of built-in identifier for declaration nameDRT-W1247The last statement of the 'case' should be 'break', 'continue', 'rethrow', 'return', or 'throw'DRT-W1248Switch case expression type can't override the '==' operatorDRT-W1249The switch case expression type must be a subtype of the switch expression typeDRT-W1250Avoid const keywordDRT-W1175Use string in part of directivesDRT-W1207Nullable variable cast to non-nullable type without being assignedDRT-W1251This cast always throws an exception because the expression always evaluates to 'null'DRT-W1252Invalid type in 'as' expressionDRT-W1253Constant values from a deferred library can't be used as keys in a 'const' map literal. Constant values from a deferred library can't be used as values in a 'const' constructor. Constant values from a deferred library can't be used as values in a 'const' list literal. Constant values from a deferred library can't be used as values in a 'const' map literal. Constant values from a deferred library can't be used as values in a 'const' set literalDRT-W1255Cannot implement `Finalizable` for a subclass of `Struct` or `Union`DRT-W1256Missing method body in non-abstract classDRT-W1258Conflicting names for named constructor and static memberDRT-W1259Invalid use of built-in identifier as a typeDRT-W1246Conflicting generic interfacesDRT-W1260Type parameter has the same name as the class, mixin, or extension that declares itDRT-W1261Conflicting type variable and memberDRT-W1262Mismatch between constant pattern and value typeDRT-W1263The expression of a constant pattern must be a valid constantDRT-W1264Non-const field initialized in a const constructorDRT-W1266Constant constructor can't call a non-constant super constructorDRT-W1267Can't define a const constructor for a class with non-final fieldsDRT-W1268Deferred classes can't be created with 'const'DRT-W1269Const variables must be initialized with a constant valueDRT-W1270Constant values from a deferred library can't be used to initialize a 'const' variableDRT-W1271Only static fields can be declared as constDRT-W1272Key in a constant map can't override the `==` operator, or `hashCode`DRT-W1273Constant must be initializedDRT-W1274Invalid implementation of `==` or `hashCode` in a constant set elementDRT-W1275A list or a set is expected in this spreadDRT-W1276A map is expected in this spreadDRT-W1277The constructor being called isn't a const constructorDRT-W1278Arguments of a constant creation must be constant expressionsDRT-W1279A constant constructor tearoff can't use a type parameter as a type argument. A constant creation can't use a type parameter as a type argument. A constant function tearoff can't use a type parameter as a type argumentDRT-W1280<a id="continue_label_on_switch" aria-hidden="true"></a>_(Previously known as `continue_label_on_switch`) The label used in a 'continue' statement must be defined on either a loop or a switch memberDRT-W1281Subclasses of 'Struct' and 'Union' are backed by native memory, and can't be instantiated by a generative constructorDRT-W1282Invalid class name specified for instance creationDRT-W1283Dead codeDRT-W1284Dead code: Catch clauses after a 'catch (e)' or an 'on Object catch (e)' are never reachedDRT-W1285Unreachable `catch` clause after a more general oneDRT-W1286The left operand can't be null, so the right operand is never executedDRT-W1287The default 'List' constructor isn't available when null safety is enabledDRT-W1288Parameters in a function type can't have default valuesDRT-W1289Default values aren't allowed in factory constructors that redirect to another constructorDRT-W1290Required named parameters can't have a default valueDRT-W1291Imports of deferred libraries must hide all extensionsDRT-W1292Unassigned late local variable is definitely unassigned at this pointDRT-W1293Using a colon as the separator before a default value is deprecated and will not be supported in language version 3.0 and laterDRT-W1295Avoid importing deprecated names from librariesDRT-W1296Deprecated member used in a different packageDRT-W1298Using the 'new' keyword in a comment reference is deprecatedDRT-W1299Extending 'Function' is deprecated. Implementing 'Function' has no effect. Mixing in 'Function' is deprecatedDRT-W1300Only a generic type, generic function, generic instance method, or generic constructor can have type argumentsDRT-W1301Constructor already definedDRT-W1303Duplicate declaration of nameDRT-W1304Duplicate exportDRT-W1305Multiple initializing parameters for the same field in a constructorDRT-W1306Duplicate field name in record literal or type annotationDRT-W1307Duplicate hidden nameDRT-W1308Redundant ignore comment for diagnosticDRT-W1309Duplicate named arguments in method invocationDRT-W1311Duplicate assignment in pattern assignmentDRT-W1313Duplicate field or getter in pattern matchingDRT-W1314At most one rest element is allowed in a list or map patternDRT-W1315Duplicate shown nameDRT-W1316Duplicate variable declaration in logical-and patternDRT-W1317A map pattern must have at least one entryDRT-W1318A record literal without fields can't have a trailing commaDRT-W1319The list of named fields in a record type can't be emptyDRT-W1320A record type without fields can't have a trailing commaDRT-W1321Empty subclass of 'Struct' or 'Union' is not supportedDRT-W1322The name of the enum constant can't be the same as the enum's nameDRT-W1323The invoked constructor isn't a 'const' constructorDRT-W1324Mixins applied to enums can't have instance variablesDRT-W1325Enum members should not be abstractDRT-W1326The name 'values' is not a valid name for an enumDRT-W1327Two elements in a constant set literal can't be equalDRT-W1328Two elements in a set literal shouldn't be equalDRT-W1329Two keys in a constant map literal can't be equalDRT-W1330Classes can only extend other classesDRT-W1342Two keys in a map literal shouldn't be equalDRT-W1331Two keys in a map pattern can't be equalDRT-W1332List patterns can have at most one type argumentDRT-W1333List literals should have at most one type argumentDRT-W1334Set literals should have at most one type argumentDRT-W1335Expected two map pattern type argumentsDRT-W1336Invalid number of type arguments in map literalDRT-W1337Internal library can't be exportedDRT-W1338Incompatible null safety between exported librariesDRT-W1339Invalid export directive for a part fileDRT-W1340Expressions can't be used in a map literalDRT-W1341Extension can't be used as an expressionDRT-W1343Conflicting instance and static members in an extensionDRT-W1344Extensions can't declare abstract membersDRT-W1345Extensions can't declare constructorsDRT-W1346Extensions can't declare instance fieldsDRT-W1347Extensions can't declare members with the same name as a member declared by 'Object'DRT-W1348Extension override argument is not assignableDRT-W1350An extension override can only be used to access instance membersDRT-W1351Extension overrides have no value so they can't be used as the receiver of a cascade expressionDRT-W1352External fields can't have initializers. External variables can't have initializersDRT-W1353Fields in a struct class must have exactly one annotation indicating the native typeDRT-W1354Too many positional argumentsDRT-W1355Too many positional arguments for method with named parametersDRT-W1356'Array's must have exactly one 'Array' annotationDRT-W1357Duplicate field initialization in constructorDRT-W1358Fields can't be initialized in the constructor if they are final and were already initialized at their declarationDRT-W1359Fields can't be initialized in both the parameter list and the initializersDRT-W1360Initializing formal parameters can't be used in factory constructorsDRT-W1361Constructors in subclasses of 'Struct' and 'Union' can't have field initializersDRT-W1362Incompatible type in field initializationDRT-W1363Field formal parameters can only be used in a constructor. Initializing formal parameters can only be used in constructorsDRT-W1364The redirecting constructor can't have a field initializerDRT-W1365Incompatible types for field and initializing formal parameterDRT-W1366Fields in subclasses of 'Struct' and 'Union' can't have initializersDRT-W1367Duplicate initialization of final fieldDRT-W1369Final variable must be initializedDRT-W1370Functions marked 'async' must have a return type which is a supertype of 'Future'DRT-W1380The compile-time constant expression depends on itselfDRT-W1583Missing initialization for final instance fieldsDRT-W1371Invalid element type in for-in loopDRT-W1373Invalid type in for-in loopDRT-W1374A for-in loop variable can't be a 'const'DRT-W1375A method tear-off on a receiver whose type is 'dynamic' can't have type argumentsDRT-W1376Generic subclasses of 'Struct' or 'Union' are not allowedDRT-W1377Incompatible types for getter and setterDRT-W1378Functions marked 'async*' must have a return type that is a supertype of 'Stream<T>' for some type 'T'DRT-W1379Illegal concrete member in EnumDRT-W1381Functions marked 'sync*' must have a return type that is a supertype of 'Iterable<T>' for some type 'T'DRT-W1383Classes and mixins can only implement other classes and mixinsDRT-W1384Duplicate class in 'implements' clauseDRT-W1385Same class used in 'extends' and 'implements' or 'with' clausesDRT-W1386Implicitly invoked unnamed constructor has missing required parametersDRT-W1387Invalid reference to instance member in constructorDRT-W1388The imported library defines a top-level function named 'loadLibrary' that is hidden by deferring this libraryDRT-W1389Internal library can't be importedDRT-W1390Unsafe import of legacy library into a null safe libraryDRT-W1391Avoid importing part files directlyDRT-W1392Conflicting method signatures in inherited classesDRT-W1393Parts must have exactly the same language version override as the libraryDRT-W1394Inconsistent type or finality of pattern variable in logical-orDRT-W1395Non-existent field initialized in constructorDRT-W1396Static field initialized in constructorDRT-W1397Invalid initializing formal parameterDRT-W1398Invalid access of static member through instanceDRT-W1399Instance members can't be accessed from a factory constructorDRT-W1400Instance members can't be accessed from a static methodDRT-W1401Abstract classes can't be instantiatedDRT-W1402Enums can't be instantiatedDRT-W1403Type aliases that expand to a type parameter can't be instantiatedDRT-W1404Integer literal imprecise as a doubleDRT-W1405Annotation must be either a const variable reference or const constructor invocationDRT-W1407Constant values from a deferred library can't be used in annotationsDRT-W1408Constant values from a deferred library can't be used as annotationsDRT-W1409Invalid annotation targetDRT-W1410Incompatible types for variable assignmentDRT-W1411Unsupported package dependencyDRT-W1412The function 'main' can't have any required named parametersDRT-W1462Invalid second argument for `Pointer.fromFunction` or `NativeCallable.isolateLocal` with certain return typesDRT-W1413Invalid export of internal declarationDRT-W1414Invalid export of internal element indirectlyDRT-W1415Extension overrides must have exactly one argument: the value of 'this' in the extension methodDRT-W1416Factory method must have a return typeDRT-W1417Factory method doesn't return a newly allocated objectDRT-W1418The name of a factory constructor must be the same as the name of the immediately enclosing classDRT-W1419Prefer declaring const constructors on `@immutable` classesDRT-W1126Record field names can't be a dollar sign followed by an integer when the integer is the index of a positional field. Record field names can't be private. Record field names can't be the same as a member from 'Object'DRT-W1420Invalid field type in subclass of `Struct`DRT-W1421Invalid concrete implementation of abstract methodDRT-W1422Only public elements in a package's private API can be annotated as being internalDRT-W1424Invalid Dart language version override comment formatDRT-W1425Only const constructors can have the `@literal` annotationDRT-W1426Invalid constructor modifierDRT-W1427Setters can't use 'async', 'async*', or 'sync*'DRT-W1428The annotation '@nonVirtual' can only be applied to a concrete instance memberDRT-W1429Invalid usage of null-aware operators on non-nullable receiversDRT-W1430Invalid method overrideDRT-W1431Invalid throw expression typeDRT-W1643Invalid override of member with '@nonVirtual' annotationDRT-W1432Inconsistent variable declaration in switch statement casesDRT-W1433The 'platforms' field must be a map with platforms as keysDRT-W1434Generative enum constructors can only be used as targets of redirectionDRT-W1435Invalid reference to 'this' expressionDRT-W1436Incompatible return type in `Future.catchError` invocationDRT-W1437The annotation '@sealed' can only be applied to classesDRT-W1438Fields of type 'Array' must have exactly one 'Array' annotationDRT-W1482Super parameters can only be used in non-redirecting generative constructorsDRT-W1439Invalid type argument in constant list, map, or set literalDRT-W1440Invalid URI syntaxDRT-W1441Invalid use of `covariant` in extensionDRT-W1442Reference to internal declaration outside the packageDRT-W1443An expression whose value is always 'null' can't be dereferencedDRT-W1444Invalid usage of class or mixin declaration modifiersDRT-W1445Invalid use of visible for overriding memberDRT-W1446A negation operand must have a static type of 'bool'DRT-W1507Member annotated with `@visibleForTesting` used outside of testsDRT-W1447Invalid use of visibility annotation on non-public declarationDRT-W1448The annotation 'visibleForOverriding' can only be applied to a public instance member that can be overriddenDRT-W1449The annotation 'visibleOutsideTemplate' can only be applied to a member of a class, enum, or mixin that is annotated with 'visibleForTemplate'DRT-W1450Invocation of extension that doesn't define a `call` methodDRT-W1451Invocation of a non-functionDRT-W1452The expression doesn't evaluate to a function, so it can't be invokedDRT-W1453Invalid label reference in outer methodDRT-W1454Undefined labelDRT-W1455Can't have a late final field in a class with a generative const constructorDRT-W1456The late final local variable is already assignedDRT-W1457FFI leaf call can't return a 'Handle'DRT-W1458FFI leaf call can't take arguments of type 'Handle'DRT-W1459Incompatible types in list literalDRT-W1460The type of the first positional parameter of the 'main' function must be a supertype of 'List<String>'DRT-W1461Invalid operand type for logical operatorDRT-W1508The function 'main' can't have more than two required positional parametersDRT-W1463The declaration named 'main' must be a functionDRT-W1464Map entries can only be used in a map literalDRT-W1465Invalid key type in map literalDRT-W1466Incompatible value type in map literalDRT-W1467The annotation doesn't match the declared type of the fieldDRT-W1468Missing annotation for fields in subclasses of `Struct` or `Union`DRT-W1469Missing default value for non-nullable optional parameterDRT-W1471Missing dependency on imported packageDRT-W1472Missing case clause for enum valuesDRT-W1473Missing exceptional return value for method invocation in `dart:ffi`DRT-W1474Fields in struct classes must have an explicitly declared type of 'int', 'double' or 'Pointer'DRT-W1475The getter name is not specified explicitly, and the pattern is not a variableDRT-W1477Missing concrete implementation of a `@mustBeOverridden` memberDRT-W1478Missing required argumentDRT-W1479Missing required parameterDRT-W1480Implicit return at the end of function or methodDRT-W1481Use adjacent strings to concatenate string literalsDRT-W1120Missing variable pattern in one branch of logical-or patternDRT-W1483Mismatched method signature in mixin invocationDRT-W1484Invalid mixin applicationDRT-W1485Missing concrete implementation of super-invoked memberDRT-W1486Mixin class can only extend `Object`DRT-W1487Invalid use of class with constructor as a mixinDRT-W1488Mixin class extends a class other than `Object`DRT-W1489Mixins can't be instantiatedDRT-W1490Classes can only mix in mixins and classesDRT-W1491Mixin constraint is sealed and can't be usedDRT-W1492Use `isNotEmpty` for Iterables and MapsDRT-W1148Only classes and mixins can be used as superclass constraintsDRT-W1494Constructors can have only one 'this' redirection, at mostDRT-W1495A constructor can have at most one 'super' initializerDRT-W1496Invalid type argument for FFI invocationDRT-W1497Function type must be a subtype of the type argument in FFI invocationDRT-W1498Immutable class defines non-final instance fieldsDRT-W1499Missing invocation of overridden methodDRT-W1500Function passed to 'NativeCallable.listener' must return 'void'DRT-W1501The value of the 'name' field is required to be a stringDRT-W1502Undefined unnamed constructorDRT-W1503Missing concrete implementation of abstract member(s)DRT-W1504Conditions must have a static type of 'bool'DRT-W1505Annotation creation can only call a const constructorDRT-W1509Avoid library directives unless they have documentation comments or annotationsDRT-W1181Avoid null in null-aware assignmentDRT-W1183Case expressions must be constantDRT-W1510Constant values from a deferred library can't be used as a case expressionDRT-W1511The default value of an optional parameter must be constantDRT-W1512Constant values from a deferred library can't be used as a default parameter valueDRT-W1513Use generic function type syntax for parametersDRT-W1199The values in a const list literal must be constantsDRT-W1514The elements in a const map literal must be constantDRT-W1515The keys in a const map literal must be constantDRT-W1516Key expressions in map patterns must be constantsDRT-W1517The values in a const map literal must be constantDRT-W1518The relational pattern expression must be a constantDRT-W1519The values in a const set literal must be constantsDRT-W1520Invalid use of type parameter as a type argumentDRT-W1521Inherited member is always abstract in the supertypeDRT-W1217Missing `const` keyword when invoking a constructor with `@literal` annotationDRT-W1522Generative enum constructors must be 'const'DRT-W1523Spread elements in map literals must implement 'Map'DRT-W1544Non-exhaustive switch expression over an exhaustive typeDRT-W1524Non-exhaustive switch statement over an exhaustive typeDRT-W1525Non generative constructor in initializer listDRT-W1527Implicit generative constructor in subclass cannot invoke explicit unnamed factory constructor in superclassDRT-W1528Invalid C function signature for 'asFunction' invocationDRT-W1529Array dimensions must be positive numbersDRT-W1530Invalid type argument for class `Array`DRT-W1531Factory bodies can't use 'async', 'async*', or 'sync*'DRT-W1532Invalid use of non-type identifier as type argumentDRT-W1533The return type of the operator []= must be 'void'DRT-W1535The return type of the setter must be 'void' or absentDRT-W1536Non-nullable local variable must be assigned before useDRT-W1537Invalid use of unary operator as a binary operatorDRT-W1539Uninitialized non-nullable instance fieldDRT-W1541Non-nullable variables must be initializedDRT-W1542Spread elements in list or set literals must implement 'Iterable'DRT-W1543Cannot infer missing types from overridden methodsDRT-W1546Invalid superclass for class with generative constructorsDRT-W1547A potentially nullable type can't be used in an 'on' clause because it isn't valid to throw a nullable expressionDRT-W1548A class can't extend a nullable typeDRT-W1549A class or mixin can't implement a nullable typeDRT-W1550A mixin can't have a nullable type as a superclass constraintDRT-W1551Invalid null argument for non-nullable type argumentDRT-W1553Keys in the `platforms` field can't have valuesDRT-W1571This null-check will always throw an exception because the expression will always evaluate to 'null'DRT-W1554Using a colon as the separator before a default value is no longer supportedDRT-W1555Duplicate superclass constraint in mixinDRT-W1556Optional parameters aren't allowed when defining an operatorDRT-W1557The field doesn't override an inherited getter or setter. The getter doesn't override an inherited getter. The method doesn't override an inherited method. The setter doesn't override an inherited setterDRT-W1558Structs must have at most one 'Packed' annotationDRT-W1559Only packing to 1, 2, 4, 8, and 16 bytes is supportedDRT-W1560Avoid including a file from a different library as a part of itselfDRT-W1561Missing part-of directive in included fileDRT-W1562Invalid 'part of' directive in unnamed libraryDRT-W1563Dependency path does not existDRT-W1564Dependencies defined must be a mapDRT-W1294Dependency path isn't a POSIX-style pathDRT-W1565Missing 'pubspec.yaml' file in directoryDRT-W1566Only local variables can be assigned in pattern assignmentsDRT-W1567Constant values from a deferred library can't be used in patternsDRT-W1568Mismatched value type in pattern assignment or declarationDRT-W1569Pattern variables can't be assigned inside the guard of the enclosing guarded patternDRT-W1570Positional super parameters can't be used when the super constructor invocation has a positional argumentDRT-W1573Name conflict between import prefix and top-level declarationDRT-W1574Import prefix must be followed by `.`DRT-W1575Prefix shadowed by a local declarationDRT-W1576Conflicting private member names in mixinsDRT-W1577Private setter used in a libraryDRT-W1579Duplicate importDRT-W1310A record literal with exactly one positional field requires a trailing commaDRT-W1581A record type with exactly one positional field requires a trailing commaDRT-W1582Constructors can't redirect to themselves either directly or indirectlyDRT-W1584Circular type hierarchyDRT-W1585Redirected constructor is undefinedDRT-W1586Generative constructors can't redirect to a factory constructorDRT-W1587Fields of 'Struct' and 'Union' subclasses must be marked externalDRT-W1368Invalid declaration of 'values' in a class that implements 'Enum'DRT-W1382Non-type in catch clauseDRT-W1534A class or mixin can't mix in a nullable typeDRT-W1552Object patterns can only use named fieldsDRT-W1572Final variable can't be read because it's potentially unassigned at this pointDRT-W1580The prefix of a deferred import can't be used in other import directivesDRT-W1620Undefined name in type test expressionDRT-W1652Undefined enum constantDRT-W1657Unnecessary '?' for nullable typesDRT-W1686Relational pattern operand type not assignable to operator parameter typeDRT-W1597The redirecting constructor can't have a 'super' initializerDRT-W1637Invalid name in hide combinator for imported libraryDRT-W1665Redirect to abstract class constructorDRT-W1588Incompatible parameters in redirected constructorsDRT-W1589Invalid return type in factory constructor redirectionDRT-W1590Redirect to missing constructorDRT-W1591Invalid redirect in a redirected constructorDRT-W1592A constant redirecting constructor can't redirect to a non-constant constructorDRT-W1593A redirecting constructor can't redirect to a type alias that expands to a type parameterDRT-W1594Variable referenced before declarationDRT-W1595Refutable patterns can't be used in an irrefutable contextDRT-W1596The return type of operators used in relational patterns must be assignable to 'bool'DRT-W1598A map pattern can't contain a rest patternDRT-W1599A rethrow must be inside of a catch clauseDRT-W1600Constructors can't return valuesDRT-W1601Can't return a value from a generator function that uses the 'async*' or 'sync*' modifierDRT-W1602Invalid return of value annotated with `doNotStore`DRT-W1603Return value type mismatchDRT-W1604The return value is missing after 'return'DRT-W1606Missing import for 'Future' and 'Stream' classes in lower version SDKsDRT-W1607The use of an as expression in a constant expression wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versionsDRT-W1608Invalid use of boolean operators in constant contextDRT-W1609Tearing off a constructor requires the 'constructor-tearoffs' language featureDRT-W1610Using the operator '==' for non-primitive types wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versionsDRT-W1611Extension methods weren't supported until version 2.6.0, but this code is required to be able to run on earlier versionsDRT-W1612The operator '>>>' wasn't supported until version 2.14.0, but this code is required to be able to run on earlier versionsDRT-W1613The use of an is expression in a constant context wasn't supported until version 2.3.2, but this code is required to be able to run on earlier versionsDRT-W1614The type 'Never' wasn't supported until version 2.12.0, but this code is required to be able to run on earlier versionsDRT-W1615Set literals weren't supported until version 2.2, but this code is required to be able to run on earlier versionsDRT-W1616The for, if, and spread elements weren't supported until version 2.3.0, but this code is required to be able to run on earlier versionsDRT-W1617The if and spread elements weren't supported in constant expressions until version 2.5.0, but this code is required to be able to run on earlier versionsDRT-W1618Element can't be assigned to the setDRT-W1619'Array's must have an 'Array' annotation that matches the dimensionsDRT-W1621Invalid use of static access to instance memberDRT-W1622Subtype of `base` or `final` is not `base`, `final` or `sealed`DRT-W1623Classes and mixins can't implement deferred classes. Classes can't extend deferred classes. Classes can't mixin deferred classesDRT-W1624Cannot extend or implement FFI classes other than 'Struct' or 'Union'DRT-W1626Avoid extending, mixing in, or implementing sealed class outside of the same packageDRT-W1627A type alias that expands to a type parameter can't be implemented. A type alias that expands to a type parameter can't be mixed in. A type alias that expands to a type parameter can't be used as a superclass constraint. A type alias that expands to a type parameter can't be used as a superclassDRT-W1629Mismatched parameter type in super constructorDRT-W1630No associated named super constructor parameterDRT-W1631Undefined or inaccessible methodDRT-W1668No associated positional super constructor parameterDRT-W1632Super invocation not at the end of initializer listDRT-W1633The enum constructor can't have a 'super' initializerDRT-W1634The 'super' keyword can't be used in an extension because an extension doesn't have a superclassDRT-W1635Invalid context for 'super' invocationDRT-W1636The 'case' shouldn't complete normallyDRT-W1638Incompatible types in switch statementDRT-W1639A generative constructor of an abstract class can't be torn offDRT-W1640Text direction Unicode code points in literalDRT-W1642Self-referencing variables with no type annotationDRT-W1644Typedefs can't reference themselves directly or recursively via another typedefDRT-W1645Deferred type can't be used in a declaration, cast, or type testDRT-W1646Type argument not matching boundsDRT-W1647Tests for non-null should be done with '!= null'. Tests for null should be done with '== null'DRT-W1648Static members can't reference type parameters of the classDRT-W1649Type parameter bound is redundantDRT-W1650Non-type used in an 'is' expressionDRT-W1651Nullable expression used without null checkDRT-W1653Undefined annotationDRT-W1654Class is undefinedDRT-W1655Missing or invalid superclass constructor invocationDRT-W1656Enum doesn't have an unnamed constructorDRT-W1658Undefined getter for extensionDRT-W1659Unnecessary dev dependencyDRT-W1678Undefined method for extensionDRT-W1660Undefined operator for extensionDRT-W1661Undefined setter in extensionDRT-W1662Undefined functionDRT-W1663Undefined or invisible getterDRT-W1664Undefined identifierDRT-W1666Undefined name 'await' in function body not marked with 'async'DRT-W1667Unused local variableDRT-W1698Undefined named parameter in method or function invocationDRT-W1669Undefined operatorDRT-W1670Identifier not defined the imported libraryDRT-W1671Undefined parameter name in `UseResult.unless` annotationDRT-W1672Undefined setterDRT-W1673Invalid name in show combinator for imported libraryDRT-W1674Undefined super memberDRT-W1675Unrecognized platform name in `pubspec.yaml`DRT-W1676Unnecessary castDRT-W1677Invalid number of parameters in operator declarationDRT-W1709Unnecessary importDRT-W1679A double can't equal 'double.nan', so the condition is always 'false'. A double can't equal 'double.nan', so the condition is always 'true'DRT-W1680The '!' will have no effect because the receiver can't be nullDRT-W1681Unnecessary 'noSuchMethod' declarationDRT-W1682The null-assert pattern will have no effect because the matched type isn't nullableDRT-W1683The operand can't be null, so the condition is always 'false'. The operand can't be null, so the condition is always 'true'DRT-W1685Braces unnecessarily wrap this expression in a set literalDRT-W1687Unnecessary type check; the result is always 'false'. Unnecessary type check; the result is always 'true'DRT-W1688Static members from supertypes must be qualified by the name of the defining typeDRT-W1689Static members from the extended type or one of its superclasses must be qualified by the name of the defining typeDRT-W1690This case is covered by the previous casesDRT-W1691Unused exception variable in catch clauseDRT-W1692Unused stack trace parameter in catch blockDRT-W1693Unused private declarationDRT-W1694Unused private fieldDRT-W1695Remove unused importDRT-W1696Unused labelDRT-W1697Unused result of `useResult` annotated functionDRT-W1699Unused name in show combinatorDRT-W1700Invalid file referenceDRT-W1701Target URI hasn't been generatedDRT-W1702URIs can't use string interpolationDRT-W1703Dart native extensions are deprecated and aren't available in Dart 2.15DRT-W1704This expression has a type of 'void' so its value can't be usedDRT-W1705A member named 'values' can't be declared in an enumDRT-W1706Variable patterns in declaration context can't specify 'var' or 'final' keywordDRT-W1707Invalid type assignment in constant expressionDRT-W1708Setters must declare exactly one required positional parameterDRT-W1710Wrong number of type parameters and type argumentsDRT-W1711Invalid placement of type arguments in named constructorDRT-W1712Wrong number of type arguments provided for enum constantDRT-W1713Wrong number of type parameters and type arguments in extensionDRT-W1714Wrong number of type parameters and type arguments in methodDRT-W1715Mismatch between yielded value type and return typeDRT-W1717Incompatible return type for closureDRT-W1605Restricted classes used in inheritance and implementation clausesDRT-W1625Invalid transitive inheritance of `Struct`, `Union` or `AbiSpecificInteger` classDRT-W1628Text direction Unicode code points in commentDRT-W1641The null-check pattern will have no effect because the matched type isn't nullableDRT-W1684Yield statements must be in a generator function (one marked with either 'async*' or 'sync*'). Yield-each statements must be in a generator function (one marked with either 'async*' or 'sync*')DRT-W1716
Dart Analyze logoDart Analyze/
DRT-W1642

Text direction Unicode code points in literalDRT-W1642

Major severityMajor
Bug Risk categoryBug Risk

The analyzer produces this diagnostic when it encounters source that contains text direction Unicode code points. These code points cause source code in either a string literal or a comment to be interpreted and compiled differently than how it appears in editors, leading to possible security vulnerabilities.

Example

The following code produces this diagnostic twice because there are hidden characters at the start and end of the label string:

var label = 'Interactive text';

Common fixes

If the code points are intended to be included in the string literal, then escape them:

var label = '\u202AInteractive text\u202C';

If the code points aren't intended to be included in the string literal, then remove them:

var label = 'Interactive text';