Flutter Design Patterns: 23 — Observer
An overview of the Observer design pattern and its implementation in Dart and Flutter
In the last article, I analysed a behavioural design pattern that reduces dependencies between a set of interacting objects by decoupling the interaction logic from the objects and moving it to a dedicated controller — Mediator. In this article, I would like to analyse and implement another behavioural design pattern that lets you define a publish-subscribe mechanism to notify multiple objects about any events that happen to the object they’re subscribed to — it is Observer.
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 Observer design pattern?
- Analysis
- Implementation
- Other articles in this series
- Your contribution