Skip to content

Instantly share code, notes, and snippets.

@DavidLiedle
Last active July 11, 2018 00:52
Show Gist options
  • Save DavidLiedle/b85e69c98b0325fdd494bf05a325870c to your computer and use it in GitHub Desktop.
Save DavidLiedle/b85e69c98b0325fdd494bf05a325870c to your computer and use it in GitHub Desktop.
Flutter NYC Meetup July 2018 - What's new in Dart 2.0
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
Copy link

PracticalCode commented Jul 11, 2018

class Puppy extends Animal {
  // 
  speak() {
    print('Bow to the wow... ' + String.fromCharCode(0x1f436) + ' Bow wow!');
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment