String Literals and Quotes
Single, double, and triple-quoted strings.
What a String Literal Is
A string literal is text you type directly into your code, wrapped in quotes so Dart treats it as words, not commands.
var greeting = 'Hello, Dart!';Single Quotes Work Great
The most common way to write text in Dart is with single quotes. They are clean, quick, and the style most Dart code uses.
var name = 'Ada';All lessons in this course
- String Literals and Quotes
- String Interpolation With the Dollar Sign
- Multi-line and Raw Strings
- Everyday String Methods