Last active
July 11, 2018 00:52
-
-
Save DavidLiedle/b85e69c98b0325fdd494bf05a325870c to your computer and use it in GitHub Desktop.
Flutter NYC Meetup July 2018 - What's new in Dart 2.0
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(){ | |
Animal bob = new Kitten(); | |
bob.grow(); | |
bob.birthday(); | |
} | |
class Animal { | |
int age; | |
Animal(){ | |
age = 0; | |
print("Animal in the house!"); | |
} | |
grow(){ | |
age++; | |
} | |
birthday(){ | |
print("My age is: ${age}"); | |
} | |
} | |
class Kitten extends Animal { | |
// | |
} | |
class Puppy extends Animal { | |
// | |
} |
PracticalCode
commented
Jul 11, 2018
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment