unnecessary_brace_in_string_interps

Group: style

Maturity: stable

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

flutter

View the Project on GitHub dart-lang/linter

AVOID using braces in interpolation when not needed.

If you're just interpolating a simple identifier, and it's not immediately followed by more alphanumeric text, the {} can and should be omitted.

GOOD:

print("Hi, $name!");

BAD:

print("Hi, ${name}!");