Skip to content

Instantly share code, notes, and snippets.

@arindambiswas
Created August 16, 2019 11:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arindambiswas/21f878d59826f38c6cb04cff78821ca9 to your computer and use it in GitHub Desktop.
Save arindambiswas/21f878d59826f38c6cb04cff78821ca9 to your computer and use it in GitHub Desktop.
Dart : Constructor shorthand
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