Created
November 10, 2023 12:47
-
-
Save Hackathonwave/35afe1526127da30390b2bbf28fce78e to your computer and use it in GitHub Desktop.
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
class Dog { | |
String breed; | |
int age; | |
String name; | |
Dog(this.breed, this.age, this.name); | |
void bark(){ | |
print("woof!"); | |
} | |
void fetch () { | |
print("Fetching the ball!"); | |
} | |
} | |
void main() { | |
var myDog = Dog('Librator', 3, 'max'); | |
myDog.bark(); | |
myDog.fetch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment