- Notifications
You must be signed in to change notification settings - Fork18
Design Pattern Examples in Dart
License
RefactoringGuru/design-patterns-dart
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository is part of theRefactoring.Guru project.It containsDart examples for all classicGoF design patterns.
- Creation
- Abstract Factory [Conceptual Gui Factory] [
Tool Panel Factory] - Builder - [Conceptual] [Color Text Format]
- Factory Method [Conceptual Platform Dialog]
- Prototype - [Shapes]
- Singleton - [Conceptual]
- Abstract Factory [Conceptual Gui Factory] [
- Behavioral
- Chain of Responsibility - [Server Middleware]
- Command - [Conceptual] [Text Editor]
- Interpreter - [Conceptual]
- Iterator - [Word Iterator] [Github Commit]
- Mediator - [Conceptual]
- Memento - [Conceptual] [
Memento Editor] - Observer - [Open-Close Editor Events] [AppObserver] [
Subscriber Flutter Widget] - State - [Conceptual] [
State Manipulator] - Template Method - [Data Miner]
- Visitor - [Conceptual] [Shape XML Exporter]
- Strategy [View Strategy] [Reservation Cargo Spaces]
- Structural
- Adapter - [Text Graphics] [Square Round conflict] [
Flutter Adapter] - Bridge - [Remote Device Control] [Clock]
- Composite - [Image Editor] [Products and Boxes]
- Decorator - [Data Source Decoder]
- Facade - [Conceptual]
- Flyweight - [Conceptual]
- Proxy - [Conceptual]
- Adapter - [Text Graphics] [Square Round conflict] [
The examples were written inDart 2.17.Some complex examples requireFlutter 3.0.0.
We appreciate any help, whether it's a simple fix of a typo or a whole new example.Justmake a fork,do your change and submit apull request.
- Just make a fork.
- Clone the forked repository to your local machine.
- Create a new branch and name it, for example: fix-issue-32.
- Make changes.
- Create commits and push them to your forked Github repository.
- Submit a pull request to the master branch.
- Wait for review.
Here's a style guide which might help you to keep your changes consistent with our code:
All code should meet theEffective Dart: Style.
UseDart Format or auto format shortcut
Ctrl + Alt + Lin your ide.Try to hard wrap the code at 80th's character. It helps to list the code on the website without scrollbars.
File names should match following convention:
some_class_name.dartComments may or may not have language tags in them, such as this:
// EN: All products families have the same varieties (MacOS/Windows).// This is a MacOS variant of a button.// RU: Все семейства продуктов имеют одни и те же вариации (MacOS/Windows).// Это вариант кнопки под MacOS.
Don't be scared and ignore the non-English part of such comments. If you want to changesomething in a comment like this, then do it. Even if you do it wrong, we'll tell you howto fix it during the Pull Request.
cd root directoryflutter build web -t bin\main.dart- Fork this repo:
https://github.com/RefactoringGuru/design-patterns-dart - Apply your changes.
- Run the script
dart bin\deploy_flutter_demos.dart.This script will build a web platform flutter app and push the changes to yourweb-demos branch on github. - You can now make a pull request on theweb-demos branch.
- Once approved for the merge, the web app will be available athttps://refactoringguru.github.io/design-patterns-dart .
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
About
Design Pattern Examples in Dart
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.
