Skip to content

Instantly share code, notes, and snippets.

@fvisticot
Last active October 3, 2019 22:38
Show Gist options
  • Save fvisticot/0475bd8683095a0eb7c40056aa2f3e40 to your computer and use it in GitHub Desktop.
Save fvisticot/0475bd8683095a0eb7c40056aa2f3e40 to your computer and use it in GitHub Desktop.
Divers...
void main() {
var book1 = Book("Titre", null);
var book2 = null;
print("${book1.description}");
print("${book2?.description}");
var test = book1.description ?? "default";
print(test);
}
class Book {
final title;
final description;
const Book(this.title, this.description);
String toString() {
return '$title, $description';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment