4

This is definition of Mixin Based Programming from the official Docs,

Mixin-based inheritance means that although every class (except for Object) has exactly one superclass, a class body can be reused in multiple class hierarchies.

Can anyone explain this ?

Shubhamhackz
  • 7,333
  • 7
  • 50
  • 71

2 Answers2

6

enter image description here enter image description here

From https://medium.com/flutter-community/dart-what-are-mixins-3a72344011f3

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

NeoZoom.lua
  • 2,269
  • 4
  • 30
  • 64
2

Mixins are a limited way to reduce the limitations of single-inheritance (in contrary to for example C++ which allows multiple inheritance)

Mixins allow to inherit implementations of methods from one superclass and one or more mixin classes.

See also

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567