Skip to main content

New site for Dart news and articles

For the latest Dart news, visit our new blog at .

Breaking Change: Raw string syntax

Matthias Hausner wrote to the Dart mailing list about an upcoming break change. Matthias writes:

Tomorrow Thursday 9/27 we will eliminate support for the old raw string syntax that uses the @ prefix. The new syntax requires an r instead of the @ in front of the raw string literal.

@"..."  ->  r"..."
@'...' -> r'...'
@"""..."""  ->  r"""..."""
@'''...'''  ->  r'''...'''

The Dart Editor (build 12784) can perform this change automatically.

Time to update your code!