Hey, Jeff,

I appreciate your response, it is awesome to hear that! I am happy that people find this series helpful and try to understand and apply OOP design patterns in their day-to-day programming.

Well, for the problem mentioned in your response, the Factory Method is not the best option since you have to provide a separate factory for each specific component which in your case could be overhead. But there is one pattern which I have not analysed in the series yet, but it could help to overcome this. **SPOILER ALERT** It is an Abstract Factory and allows creating a family of related objects. Correspondingly, it would be only one factory for all the related objects, e.g. a single factory of Material components.

I would recommend you to wait for this article, because, surprise surprise, it is coming next in the series!

Best wishes,
Mangirdas Kazlauskas

Written by

Software Engineer @ Devbridge | Flutter Enthusiast https://www.linkedin.com/in/mangirdas-kazlauskas/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store