Created
August 16, 2019 11:07
-
-
Save arindambiswas/21f878d59826f38c6cb04cff78821ca9 to your computer and use it in GitHub Desktop.
Dart : Constructor shorthand
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() { | |
print('START : main'); | |
Person someone = new Person('John', 'Doe'); | |
print('${someone.fname} ${someone.lname}'); | |
print('END : main'); | |
} | |
class Person { | |
String fname, lname; | |
Person(this.fname, this.lname); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment