diff --git a/style_guides/dart.md b/style_guides/dart.md index 270fe753..d11fe5ea 100644 --- a/style_guides/dart.md +++ b/style_guides/dart.md @@ -53,3 +53,17 @@ group('myFunction', () { }); }); ``` + +## PREFER to use multiline string literals for long strings + +This makes the string easier to read, and reduces the chance of accidentally +including too few or too many spaces in the string. + +```dart +// BAD +final longString = 'This is a string longer than the eighty character ' + 'limit that our lint rules enforce.'; + +// GOOD +final longString = '''This is a string longer than the eighty character limit that our lint rules enforce.''' +```