Created
June 27, 2019 12:45
-
-
Save PeterHdd/4759df08288ce52e9d91810eb2405b5c 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 Employee { | |
Employee() | |
{ | |
print("inside default"); | |
} | |
// Person does not have a default constructor; | |
// you must call super.fromJson(data). | |
Employee.fromJson(Map data){ | |
print('in Employee'); | |
} | |
} | |
main() { | |
var emp = new Employee.fromJson({}); | |
var emps = new Employee(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment