Programming Search⌘K

Dart lints, page 2 of 2

The lint rules of Dart, with what each one finds. This page has 264 cards.

The type of the right operand ('…') isn't a subtype or a supertype of the left operand ('…'). unrelated_type_equality_checks

Try changing one or both of the operands. Its category is unintentional. It is stable since Dart 2.0.

Code
unrelated_type_equality_checks
Message
The type of the right operand ('{}') isn't a subtype or a supertype of the left operand ('{}').
Message
The type of the operand ('{}') isn't a subtype or a supertype of the value being matched ('{}').

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.

Don't use 'BuildContext's across async gaps. use_build_context_synchronously

Try rewriting the code to not use the 'BuildContext', or guard the use with a 'mounted' check. Its category is errorProne, flutter. It is stable since Dart 3.2.

Code
use_build_context_synchronously
Message
Don't use 'BuildContext's across async gaps.
Message
Don't use 'BuildContext's across async gaps, guarded by an unrelated 'mounted' check.

Source: github.com, dart.dev. JSON record. This entry is a card. Help write this page.