design-patterns-in-dart icon indicating copy to clipboard operation
design-patterns-in-dart copied to clipboard

Improve decorator pattern example

Open AliAkberAakash opened this issue 3 years ago • 0 comments

In the decorator pattern example, the two classes are different. The StarbucksDecorator is not decorating an existing coffee object but creating a new coffee object every time. This class should take a coffee object in its constructor and work on it. Let me know what you think about it. I'd love to contribute to this.

AliAkberAakash avatar Sep 22 '22 12:09 AliAkberAakash