Skip to content

Instantly share code, notes, and snippets.

@randy-johnson
Created February 7, 2023 03:34
Show Gist options
  • Save randy-johnson/c258dfc9fd4e2235c454ca74d4aae6a7 to your computer and use it in GitHub Desktop.
Save randy-johnson/c258dfc9fd4e2235c454ca74d4aae6a7 to your computer and use it in GitHub Desktop.
quintessential-utopia-9882

quintessential-utopia-9882

Created with <3 with dartpad.dev.

class Person {
String? name;
int? age;
Person(String name, int age){
this.name = name;
this.age = age;
}
}
int addNumbers(int num1, int num2) {
return num1 + num2;
}
void main() {
var p1 = Person('Randy',30);
var p2 = Person('Mandy',25);
print(p1);
print(p1.name);
print(p1.age);
print(p2.name);
print(p2.age);
int firstResult = addNumbers(1, 23);
int secondResult = addNumbers(6, 7);
print(firstResult);
print(secondResult);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment