OM
omegaui/design-patterns
Quick-reference guide to software design patterns with concise Dart examples.
โก Design Patterns under 1 min
Quick-reference guide to software design patterns with concise Dart examples.
๐๏ธ Creational
All about object instantiation.
| Pattern | Description |
|---|---|
| ๐ญ Abstract Factory | Create families of related objects based on context |
| ๐งฑ Builder | Construct complex objects step by step |
| ๐จ Factory Method | Let subclasses decide which class to instantiate |
| โป๏ธ Object Pool | Reuse expensive objects instead of recreating them |
| ๐ Prototype | Clone existing objects instead of building from scratch |
| 1๏ธโฃ Singleton | Ensure a class has only one instance |
๐งฉ Structural
All about composing classes and objects.
| Pattern | Description |
|---|---|
| ๐ Adapter | Make incompatible interfaces work together |
| ๐ Bridge | Decouple abstraction from implementation |
| ๐ณ Composite | Treat individual objects and groups uniformly |
| ๐ Decorator | Add behavior dynamically without subclassing |
| ๐๏ธ Facade | Simplify a complex subsystem with one interface |
| ๐ชถ Flyweight | Share common state to save memory |
| ๐ฆ Module | Encapsulate code with controlled public API |
| ๐ Private Class Data | Restrict write access to class attributes |
| ๐ก๏ธ Proxy | Control access via a surrogate object |
๐ญ Behavioral
All about communication between objects.
| Pattern | Description |
|---|---|
| โ๏ธ Chain of Responsibility | Pass requests along a handler chain |
| ๐ Command | Encapsulate actions as objects with undo support |
| ๐ค Interpreter | Evaluate sentences in a language grammar |
| ๐ Iterator | Access collection elements sequentially |
| ๐ก Mediator | Centralize complex communication between objects |
| ๐พ Memento | Capture and restore object state |
| ๐ซ Null Object | Provide a do-nothing default to eliminate null checks |
| ๐ Observer | Notify dependents when state changes |
| ๐ State | Change behavior when internal state changes |
| ๐ฏ Strategy | Swap algorithms at runtime |
| ๐ Template Method | Define algorithm skeleton, let subclasses fill in steps |
| ๐ถ Visitor | Add operations to classes without modifying them |
On this page
Contributors
Created February 25, 2026
Updated March 7, 2026