Skip to content

Instantly share code, notes, and snippets.

@PeterHdd
Created June 27, 2019 12:45
Show Gist options
  • Save PeterHdd/4759df08288ce52e9d91810eb2405b5c to your computer and use it in GitHub Desktop.
Save PeterHdd/4759df08288ce52e9d91810eb2405b5c to your computer and use it in GitHub Desktop.
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