Flutter Design Patterns: 21 — Visitor
An overview of the Visitor design pattern and its implementation in Dart and Flutter
In the last article, I analysed a behavioural design pattern that enables loose coupling between the sender of a request and its receiver — the Chain of Responsibility. In this article, I would like to analyse and implement another behavioural design pattern that lets you separate algorithms from the objects on which they operate — it is Visitor.
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 Visitor design pattern?
- Analysis
- Implementation
- Other articles in this series
- Your contribution
What is the Visitor design pattern?
Visitor belongs to the category of behavioural design patterns. The intention of this design pattern is described in…