Flutter Design Patterns: 13 — Memento

An overview of the Memento design pattern and its implementation in Dart and Flutter

Mangirdas Kazlauskas
Flutter Community

--

In the last article, I analysed a relatively popular design pattern — Command. In this article, I would like to analyse and implement a behavioural design pattern that works pretty well alongside the Command pattern — it is Memento.

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 Memento design pattern?
  • Analysis
  • Implementation
  • Other articles in this series
  • Your contribution

What is the Memento design pattern?

Making a snapshot of the current world’s state (source)

Memento, also known as Token, belongs to the category of behavioural design patterns. The intention of this design pattern is described in the GoF book:

Without violating encapsulation, capture…

--

--

Mangirdas Kazlauskas
Flutter Community

Google Developer Expert for Flutter & Dart | Read the blog for free on kazlauskas.dev | Let's stay in touch - https://twitter.com/mkobuolys