prefer_interpolation_to_compose_strings

Group: style

Maturity: stable

Dart SDK: >= 2.0.0 • (Linter v0.1.30)

Since info is static, may be stale
effective dart

View all Lint Rules

Using the Linter

PREFER using interpolation to compose strings and values.

Using interpolation when composing strings and values is usually easier to write and read than concatenation.

BAD:

'Hello, ' + name + '! You are ' + (year - birth) + ' years old.';

GOOD:

'Hello, $name! You are ${year - birth} years old.';