Created
July 3, 2020 10:57
-
-
Save shivanchalaeologic/8143db19617c9ee33c19081c7c59d717 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
mixin Hunt on Reptile { | |
void hunt(food) { | |
print('${this.runtimeType}'); | |
swim(); | |
crawl(); | |
bite(); | |
print('Eat $food'); | |
} | |
} | |
abstract class Reptile with Swim, Crawl, Bite {} | |
class Alligator extends Reptile with Hunt { | |
} | |
class Crocodile extends Reptile with Hunt { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment