Created
June 12, 2020 16:02
-
-
Save jacobaraujo7/2170eb30bb8951708a59bf4e51726eea to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class MyClass{ | |
| final int num; | |
| MyClass({this.num = 1}); | |
| } | |
| void main() { | |
| var myClass = MyClass(); | |
| print(myClass.num); //print 1 | |
| myClass = MyClass(num: null); | |
| print(myClass.num); //print null | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment