Flutter Design Patterns: 3 — Template Method
An overview of the Template Method design pattern and its implementation in Dart and Flutter
Previously in the series, I analysed one of the most common and most useful design patterns available — Adapter. In this article, I would like to analyse and implement one of the behavioural design patterns — Template Method.
Update 2022–09–15: I moved this blog to my personal website. For a better reading experience, up to date articles, interactive code examples and some extra content FOR FREE, check kazlauskas.dev.
Table of Contents
- What is the Template Method design pattern?
- Analysis
- Implementation
- Other articles in this series
- Your contribution
What is the Template Method design pattern?
The Template Method is a behavioural design pattern, which intention in the GoF book is described like this:
Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps…