Open raveesh-me opened 6 years ago
https://www.dartlang.org/articles/language/mixins
Look into this resource as well
The problem with mixins is that we get undesired output in some cases which was the reason i din't use it. Have a look at this ==> https://www.youtube.com/watch?v=orNnzy6d6Q4&index=12&t=0s&list=PLUbFnGajtZlX9ubiLzYz_cw92esraiIBi Any further suggestions will be appreciated :+1:
https://stackoverflow.com/questions/20186198/implement-an-observer-pattern-in-dart Take note of this discussion as well. Look at the source code of the mentioned library if you can find it.
Also, in with dart, we aren't limited to inheritance and interfaces. Look into the concept of mixins. And see if this makes more sense in the code.
The code in the above question also implements this with annotations. Try to experiment with annotation processing.