Flutter Design Patterns: 12 — Command

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

Mangirdas Kazlauskas
Flutter Community

--

Previously in the series, I analysed and implemented one of the most popular and useful creational design patterns — Abstract Factory. This time, I would like to introduce an OOP design pattern that belongs to the category of behavioural design patterns — the Command.

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

What is the Command design pattern?

A dangerous command (source)

Command, also known as Action or Transaction, is one of the behavioural design patterns which intention is described in the GoF book:

Encapsulate a request as an…

--

--

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