Last active
October 3, 2019 22:38
-
-
Save fvisticot/0475bd8683095a0eb7c40056aa2f3e40 to your computer and use it in GitHub Desktop.
Divers...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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