Flutter Design Patterns: 19 — Flyweight
An overview of the Flyweight design pattern and its implementation in Dart and Flutter
In the last article, I analysed a creational design pattern that divides the construction of a complex object into several separate steps — Builder. In this article, I would like to analyse and implement a structural design pattern that helps using a huge number of objects in your code that could barely fit into available RAM — it is Flyweight.
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 Flyweight design pattern?
- Analysis
- Implementation
- Other articles in this series
- Your contribution
What is the Flyweight design pattern?
Flyweight belongs to the category of structural design patterns. The intention of this design pattern is…