Skip to main content

binary-expression-operand-order

added in: 1.6.0
🛠

Warns when a literal value is on the left hand side in a binary expressions.

❌ Bad:

final a = 1 + b;

✅ Good:

final a = b + 1;