When to use mixins and when to use interfaces in Dart?

后端 未结 6 2046
眼角桃花
眼角桃花 2020-12-07 19:28

I\'m very familiar with the concepts of interfaces and abstract classes, but not super familiar with the concepts of mixins.

Right now, in Dart, every clas

6条回答
  •  鱼传尺愫
    2020-12-07 19:31

    dart interfaces, like another language, define a contract to any class to implement, this contract its required implement his public properties and methods

    mixin it's just the another way to add functionality to your class because in dart not exist multi extends.

提交回复
热议问题