Skip to content

Instantly share code, notes, and snippets.

@Rillwz
Created August 24, 2021 21:23
Show Gist options
  • Select an option

  • Save Rillwz/077fdabbd56b6d8013448eb68db6173e to your computer and use it in GitHub Desktop.

Select an option

Save Rillwz/077fdabbd56b6d8013448eb68db6173e to your computer and use it in GitHub Desktop.
class Hero extends Character {
String hitMonster() {
return 'Take this..!';
}
}
!------------------------------------------------------
mixin DrinkAbility on Hero{
String drink() => 'gluk...gluk...gluk...';
}
!------------------------------------------------------
class Knight extends Hero with DrinkAbility{
}
!------------------------------------------------------
class main(List<String> arguments) {
Knight k = Knight();
print(k.drink() + 'is hero');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment