Dart - Design Pattern
An post for listing design pattern with dart by dopefaceee.
1. Singleton
Singleton is a creational design pattern which ensures that a class has only one instance and also provides a global point of access to it.
link: medium
2. Adapter
Adapter is a structural design pattern, also known as wrapper. It is one of the most common and most useful design patterns available to us as software developers.
link: medium
3. Template Method
The Template method is a fundamental technique for code reuse.
link: medium
4. Composite
The Composite is one of the structural design patterns. Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
link: medium
5. Strategy
Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
link: medium
6. State
Allow an object to alter its behaviour when its internal state changes. The object will appear to change its class.
link: medium
7. Facade
Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.
link: medium
8. Interpreter
Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.
link: medium
9. Iterator
Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.
link: medium
10. Factory
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
link: medium
11. Abstract Factory
Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
link: medium
12. Command
Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations.
link: medium
13. Memento
Without violating encapsulation, capture and externalize an object’s internal state so that the object can be restored to this state later.
link: medium
14. Prototype
Without violating encapsulation, capture and externalize an object’s internal state so that the object can be restored to this state later.