Flutter Design Patterns: 20 — Chain of Responsibility
An overview of the Chain of Responsibility design pattern and its implementation in Dart and Flutter
Previously in the series, I have analysed a structural design pattern that introduced a concept of a “shared object” which could be used in multiple contexts simultaneously, hence reducing the memory usage of your code — Flyweight. This time I would like to represent a behavioural design pattern, which enables loose coupling between the sender of a request and its receiver, also adding a possibility for the same request to be handled by multiple handlers — it is the Chain of Responsibility.
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 Chain of Responsibility design pattern?
- Analysis
- Implementation
- Other articles in this series
- Your contribution