Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix inheritance #83

Open
wants to merge 546 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
546 commits
Select commit Hold shift + click to select a range
2925a3b
Fix builder pattern & fix user text.
ilopX Apr 28, 2022
fff04cf
Fix name: shape -> shapes.
ilopX Apr 28, 2022
a08bd53
Fix: online link 'a' to 'the'.
ilopX Apr 28, 2022
7a518e9
Only use the repaint event in ActiveShape.
ilopX Apr 28, 2022
942cbfe
Add repaint event to diagram.
ilopX Apr 28, 2022
4df3f8e
Add repaint event to diagram.
ilopX Apr 28, 2022
a0c853d
Replace 'master' to 'main' in md files.
ilopX Apr 28, 2022
1f5925f
Bump version 0.18.9 - small fix-refactoring.
ilopX Apr 28, 2022
15161ae
Merge pull request #37 from ilopX/refactoring_v0_18
ilopX Apr 28, 2022
4b6868f
Fix local-remote host to web demos logo.
ilopX Apr 29, 2022
5d11f07
Fix local-remote host to web demos logo.
ilopX Apr 29, 2022
ad3c9ca
Merge pull request #38 from ilopX/fix-web-demos-logo-local-remote-host
ilopX Apr 29, 2022
9b341b2
Add step-by-step contribute instruction.
ilopX Apr 29, 2022
3aa4495
Merge pull request #39 from ilopX/add-step-by-step-contribute-instruc…
ilopX Apr 29, 2022
d945b5e
Impl abstract factory example.
ilopX Apr 29, 2022
2a2b5eb
Add client code & output to README.
ilopX Apr 29, 2022
f7b1ea6
Add diagram & description.
ilopX Apr 29, 2022
6a38ace
Bump version 0.19.0 & update README.
ilopX Apr 29, 2022
fb18f70
Merge pull request #40 from ilopX/add-abstract-factory-pattern
ilopX Apr 29, 2022
c6030de
Impl factory method classes. Rewrite from source origin code.
ilopX Apr 30, 2022
804f3bf
Add README to example.
ilopX Apr 30, 2022
0046ad5
Bump version 0.20.0 & update main README.
ilopX Apr 30, 2022
84bc8f0
Merge pull request #41 from ilopX/add-factory-method-pattern
ilopX Apr 30, 2022
e49672b
Fix directory name.
ilopX Apr 30, 2022
9d246c7
Merge pull request #42 from ilopX/add-factory-method-pattern
ilopX Apr 30, 2022
3ef63dc
Add pattern strategy. OverbookingPolicy example.
ilopX May 3, 2022
9b62d27
Add README.
ilopX May 3, 2022
83387b2
Update main README.
ilopX May 3, 2022
59a6e91
Bump version 0.21.0.
ilopX May 3, 2022
2388dda
Merge pull request #44 from ilopX/add-pattern-strategy
ilopX May 3, 2022
e98f618
Fix strategy pattern name & fix checkbox main README.
ilopX May 3, 2022
50a9d80
Merge pull request #45 from ilopX/fix-strategy-pattern-title
ilopX May 3, 2022
3f7f93c
Impl visitor classes.
ilopX May 8, 2022
88ae32c
Add README.
ilopX May 8, 2022
31e2a06
Fix xml header.
ilopX May 8, 2022
58656c3
Fix "visitCompoundShape()" method name.
ilopX May 8, 2022
213cd66
Add: about example.
ilopX May 8, 2022
3fcf963
Update main README.
ilopX May 8, 2022
5ffb387
Bump version 0.22.0.
ilopX May 8, 2022
ec43b4b
Merge pull request #46 from ilopX/add-visitor-pattern
ilopX May 8, 2022
06ccb2c
Divide Originator into Recovery-Backup classes.
ilopX May 9, 2022
30c49b3
Merge pull request #47 from ilopX/refactoring-split-origintator-write…
ilopX May 9, 2022
d5c2cfc
Impl project "Tool Panel".
ilopX May 16, 2022
8c33418
Impl project "Tool Panel".
ilopX May 16, 2022
09a1aa0
Add README.
ilopX May 16, 2022
18b1898
Update main README.
ilopX May 16, 2022
8859d33
Bump version 0.23.0.
ilopX May 16, 2022
f3d74d6
Merge pull request #48 from ilopX/too_panel
ilopX May 16, 2022
2b13923
Add empty property bar.
ilopX May 18, 2022
1922eb6
Fix default root project.
ilopX May 18, 2022
ebdb8c3
Add property bar listenable.
ilopX May 18, 2022
709f588
Add new properties.
ilopX May 19, 2022
506b40c
Create BaseShape.
ilopX May 19, 2022
3baaa80
Сreate property widget factories to apply pattern to flutter fidgets.
ilopX May 19, 2022
b8b420f
Drawing all shapes in one place without additional widgets.
ilopX May 19, 2022
ec6daf3
Remove name "property: from creational factory methods.
ilopX May 20, 2022
2084f2a
Rename variable: propertyWidgetFactorise to factories.
ilopX May 20, 2022
c32d264
Add an "about" and update the diagram in the README.
ilopX May 20, 2022
6556e2e
Update screenshot.
ilopX May 20, 2022
ea8b488
Remove moving painter.
ilopX May 20, 2022
a5f8712
Bump version 0.23.12.
ilopX May 20, 2022
39be84b
Merge pull request #51 from ilopX/add-properties-to-tool-factory
ilopX May 20, 2022
ad847d2
Update demos splash screen logo.
ilopX May 20, 2022
73023dc
Bump version 0.23.13.
ilopX May 20, 2022
1f2bd10
Merge pull request #52 from RefactoringGuru/update-demo-splash-screen
ilopX May 20, 2022
8cfe975
Replace web renderer html to canvakit.
ilopX May 20, 2022
5d75b06
Bump version 0.23.14.
ilopX May 20, 2022
391ed51
Merge pull request #53 from RefactoringGuru/replace-html-web-render-t…
ilopX May 20, 2022
dcc22d0
Add "ManipulatorStateApp" empty project.
ilopX May 22, 2022
2777d62
Add toolbar.
ilopX May 23, 2022
e99cc4d
Migrate to flutter 3.
ilopX May 23, 2022
3e11584
Add material icons.
ilopX May 23, 2022
1db9e2f
Add states.
ilopX May 23, 2022
50e10a5
Add "mouseDown" event to DrawingBoard.
ilopX May 23, 2022
1f44a84
Add empty behaviors states.
ilopX May 23, 2022
163eff9
Add default shape painting.
ilopX May 23, 2022
1b437b1
Make context is private.
ilopX May 23, 2022
60b0785
Fix: add type to "y" argument.
ilopX May 23, 2022
f77c5e5
Add x,y args to CreationState
ilopX May 23, 2022
fc48e34
Fix: x,y in mouseDown.
ilopX May 23, 2022
4a707b4
Draggable adds.
ilopX May 24, 2022
005c1d1
Add specific actions to states.
ilopX May 24, 2022
b508da3
Remove duplicate selection.
ilopX May 24, 2022
e5d9525
Add hover event.
ilopX May 24, 2022
ec59bed
Add HoverStateMixin.
ilopX May 24, 2022
23ac8cd
Move states mixin to separate directory.
ilopX May 24, 2022
edf5506
Add ResizableState.
ilopX May 24, 2022
13294bf
Add CircleShape.
ilopX May 24, 2022
dcbad12
Render Circle manipulation state.
ilopX May 24, 2022
3344d3d
Rename ManipulatorContext to ManipulationContext.
ilopX May 25, 2022
b711376
Add paint method to RectangleShape.
ilopX May 25, 2022
343cd90
Refactoring CreationState class.
ilopX May 25, 2022
53f67b6
Add sub "toString" to selection states.
ilopX May 25, 2022
2f39598
Add child MarkerState to ResizableState.
ilopX May 25, 2022
bad4384
Make left to right state text.
ilopX May 25, 2022
b518934
Fix: markers reposition.
ilopX May 25, 2022
2d04245
Add mouse effect to marker.
ilopX May 25, 2022
d76e900
Add ParentState & ChildState.
ilopX May 26, 2022
b45ad4b
New separate interface for ManipulationState.
ilopX May 26, 2022
65be1f4
Add corner markers for ResizableState.
ilopX May 26, 2022
ab80bfc
Add 'rect' property ru Shape.
ilopX May 26, 2022
104aa14
Rename ManipulationContext to Manipulator.
ilopX May 26, 2022
bfbca6a
Rename HoverStateMixin to HoverShape.
ilopX May 26, 2022
6abe572
Rename HoverStateMixin to HoverShapeMixin.
ilopX May 26, 2022
0e579fc
Add PaintStyle.
ilopX May 27, 2022
7670a5e
Fix cursor in corner markers.
ilopX May 27, 2022
f348d14
Fix cursor in corner markers.
ilopX May 27, 2022
8d58f62
Rename mouseMoveAction to mouseDragAction.
ilopX May 27, 2022
064e904
Fic CircleShape rect.
ilopX May 27, 2022
e969fba
Reversed shape search.
ilopX May 27, 2022
7625e79
Move changeState to children.
ilopX May 27, 2022
13ffcc9
Refactor CreationState.
ilopX May 27, 2022
f893476
Fix ToolBar: selected FreeState after creation shape.
ilopX May 27, 2022
92ce5c6
Add InnerRadiusState.
ilopX May 29, 2022
d6029ae
Rename trySelectAndStartMovingShape to tryToSelectAndStartMovingShape.
ilopX May 29, 2022
bc8e6d1
Add default width CircleCreationState.
ilopX May 29, 2022
8b93caf
Rename again tryToSelectAndStartMovingShape.
ilopX May 29, 2022
f1b21fa
Change SelectionState to ParentState int ChildState.
ilopX May 29, 2022
f8f1f18
Move resizable_state.dart to root directory.
ilopX May 29, 2022
f9e571c
Format tool_bar.dart.
ilopX May 29, 2022
8f364ad
Add generic type to SelectionState.selectedShape.
ilopX May 29, 2022
706d031
Move inner radius painter to PaintStyle.
ilopX May 29, 2022
5fcd818
InnerRadiusMarkerState add toString.
ilopX May 29, 2022
6bc1913
Add generic shape type to ChildState & rename shape to markerShape.
ilopX May 29, 2022
7c8d2a9
PaintStyle: move private vars to bottom.
ilopX May 29, 2022
268773e
Set radius line to 1.5.
ilopX May 29, 2022
28a9202
Refactor: create separate variable currentState.
ilopX May 29, 2022
7ebba53
Refactor: create separate function "buildButton".
ilopX May 29, 2022
4c3ed7b
Refactor: CurrentState widget.
ilopX May 29, 2022
ea96361
Add "paintSelection" method to PaintStyle.
ilopX May 29, 2022
e5993d6
Add selectedShape getter to CornerMarker.
ilopX May 29, 2022
bbfd133
Refactoring: RectangleShape & CircleShape.
ilopX May 30, 2022
b0ac3d1
Add TextShape, TextResizeState.
ilopX May 30, 2022
a1bc1a3
Fix wrong repeat selection in "tryToSelectAndStartMovingShape" function.
ilopX May 30, 2022
b4fcf68
Move the state helper classes to the "_" directory.
ilopX May 30, 2022
4a92407
Rename marker to child.
ilopX May 30, 2022
e657d95
Move abstract CreationState to "_" directory.
ilopX May 30, 2022
f7ba8e2
Fix TopRightMarkerState resize.
ilopX May 30, 2022
76ce7db
Refactoring InnerRadiusMarkerState. Replace selectedCircle variable t…
ilopX May 30, 2022
86d9533
Move TextSizeMarkerState to separate file.
ilopX May 30, 2022
fa13316
Refactoring BottomLeftMarkerState, TopRightMarkerState: remove unnece…
ilopX May 30, 2022
518ada6
Add double click event.
ilopX May 31, 2022
a909614
Add keyboard event.
ilopX May 31, 2022
8c478b8
Add TextChangeState.
ilopX May 31, 2022
399f86a
Add (x,y) to mousedDoubleClick.
ilopX Jun 1, 2022
95e370d
Add method init() to State interface.
ilopX Jun 1, 2022
f7c6fba
Fix height changer.
ilopX Jun 1, 2022
4d67df9
Add (x, y) to view.
ilopX Jun 1, 2022
7588a76
Add text editor.
ilopX Jun 1, 2022
0a01034
Move TextCursor to text_cursor.dart.
ilopX Jun 1, 2022
9507a28
Remove unnecessary vars.
ilopX Jun 1, 2022
484f69c
Add keyboard cursor moving: left, right.
ilopX Jun 2, 2022
385cf61
Add KeyboardActions & TextCursorAnimation.
ilopX Jun 2, 2022
23888d0
Refactoring TextCursor.
ilopX Jun 2, 2022
09fbf0e
Rename TextChangeState to TextEditState.
ilopX Jun 2, 2022
c42aadf
Refactoring: compare to class diagram.
ilopX Jun 2, 2022
2dde104
Add README.
ilopX Jun 2, 2022
1def8ee
Update main README.
ilopX Jun 2, 2022
8f95300
Bump version 0.24.0.
ilopX Jun 2, 2022
8671918
Merge pull request #57 from ilopX/add-manipulator-state
ilopX Jun 2, 2022
c7e3928
Add flutter icon to project links.
ilopX Jun 3, 2022
f9e50d8
Bump version 0.24.1.
ilopX Jun 3, 2022
080323d
Merge pull request #60 from ilopX/add-flutter-icon-to-project-links
ilopX Jun 3, 2022
038e3af
Add three_state project.
ilopX Jun 4, 2022
2ef4056
Add README.
ilopX Jun 4, 2022
0432e60
Update main README.
ilopX Jun 4, 2022
a3b573b
Bump version 0.25.0.
ilopX Jun 4, 2022
3e5bd42
Merge pull request #61 from ilopX/three_state
ilopX Jun 4, 2022
5244ee2
Fix three state diagram.
ilopX Jun 4, 2022
0c08a14
Add output to README.
ilopX Jun 4, 2022
d46cf2e
Merge pull request #62 from ilopX/fix-diagram-three-state
ilopX Jun 4, 2022
ef3bd18
Create/Impl pattern.
ilopX Jun 12, 2022
9359711
Add README.
ilopX Jun 12, 2022
44de720
Update main README.
ilopX Jun 12, 2022
59bd057
Bump version 0.26.0.
ilopX Jun 12, 2022
073826c
Fix title & add intent desk.
ilopX Jun 12, 2022
6397334
Merge pull request #63 from ilopX/add-conceptual-mediator-pattern
ilopX Jun 12, 2022
9f5f424
Create/Iml project.
ilopX Jun 15, 2022
40b51f2
Create/Iml project.
ilopX Jun 16, 2022
914b469
Create/Iml project.
ilopX Jun 16, 2022
8d7ffff
Create/Iml project.
ilopX Jun 16, 2022
7cfd7c5
Bump version 0.27.0.
ilopX Jun 16, 2022
0318c46
Merge pull request #64 from ilopX/add-template-method-pattern
ilopX Jun 16, 2022
acd931d
Fix guru file. Rename to zip.
ilopX Jun 16, 2022
f3b2ce7
Merge pull request #65 from ilopX/fix-guru-rename-to-zip
ilopX Jun 16, 2022
8e0485f
Impl flyweight conceptual pattern.
ilopX Jun 19, 2022
67f5b4a
Add README.
ilopX Jun 19, 2022
0d3caf3
Add main README.
ilopX Jun 19, 2022
26c5bc4
Bump version 0.28.0.
ilopX Jun 19, 2022
1edebd8
Merge pull request #66 from ilopX/add-conceptual-flyweight-pattern
ilopX Jun 19, 2022
80f5783
Impl conceptual visitor pattern project.
ilopX Jun 19, 2022
882f000
Add README.
ilopX Jun 20, 2022
411593d
Update main README.
ilopX Jun 20, 2022
61af886
Bump version 0.29.0.
ilopX Jun 20, 2022
45429cd
Merge pull request #67 from ilopX/add-conceptual-visitor-pattern
ilopX Jun 20, 2022
1c24958
Impl view strategy example.
ilopX Jun 23, 2022
999a228
Rename project to "View Strategy".
ilopX Jun 24, 2022
61eb1c4
Split project into separate files.
ilopX Jun 24, 2022
1e52f59
Add project README.
ilopX Jun 24, 2022
8b8de85
Update main README.
ilopX Jun 24, 2022
1295176
Bump version 0.30.0.
ilopX Jun 24, 2022
28e5cc0
Merge pull request #68 from ilopX/add-view-strategy
ilopX Jun 24, 2022
fef151c
Impl conceptual proxy pattern.
ilopX Jun 27, 2022
ccc61e1
Update main README.md.
ilopX Jun 27, 2022
67945e6
Bump version 0.31.0.
ilopX Jun 27, 2022
510dae4
Fix diagram: remove side artifacts.
ilopX Jun 27, 2022
e4d92e4
Merge pull request #69 from ilopX/add-conceptual-proxy-pattern
ilopX Jun 27, 2022
d148471
Impl conceptual interpreter pattern.
ilopX Jun 28, 2022
6190cbb
Rename "variable.dart" to "bool_variable.dart".
ilopX Jun 28, 2022
eb95362
Add README.
ilopX Jun 28, 2022
a6189c4
Update main README.
ilopX Jun 28, 2022
05af9b7
Bump version 0.32.0.
ilopX Jun 28, 2022
73e5194
Merge pull request #70 from ilopX/add-intepreter-pattern
ilopX Jun 28, 2022
a00f742
Impl conceptual builder pattern.
ilopX Jul 1, 2022
c6618a4
Add README.
ilopX Aug 4, 2022
4412cd3
Update main README.
ilopX Aug 4, 2022
5d0e223
Bump version 0.33.0.
ilopX Aug 4, 2022
c46cc84
Merge pull request #71 from ilopX/add-conceptual-builder-pattern
ilopX Aug 4, 2022
b2143cd
Impl Singleton pattern.
ilopX Aug 4, 2022
c5b867d
Rename project to "conceptual".
ilopX Aug 4, 2022
e2a9d3e
Add README.
ilopX Aug 4, 2022
d946967
Bump version 0.34.0.
ilopX Aug 4, 2022
4fcfede
Merge pull request #72 from ilopX/add-singleton-pattern
ilopX Aug 4, 2022
772a76c
Impl conceptual command pattern.
ilopX Aug 5, 2022
0d40c4f
Add README.
ilopX Aug 5, 2022
939e881
Bump version 0.35.0.
ilopX Aug 5, 2022
b46bdca
Merge pull request #73 from ilopX/add-conceptual-command-pattern
ilopX Aug 5, 2022
8dbf643
Fix conceptual command pattern folder name.
ilopX Aug 5, 2022
15aed25
Fix conceptual command pattern folder name.
ilopX Aug 5, 2022
cf5a916
Merge pull request #74 from ilopX/fix-conceptual-command-pattern-fold…
ilopX Aug 5, 2022
a853afd
Impl pattern iterator (Github commits)
ilopX Aug 5, 2022
54bef60
Add README.
ilopX Aug 5, 2022
7a0c63d
Bump version 0.36.0.
ilopX Aug 5, 2022
4983c26
Merge pull request #75 from ilopX/add-iterator-pattern
ilopX Aug 5, 2022
4262e22
Create CONTRIBUTING.md
ilopX Aug 5, 2022
5685d68
Fix title of iterator readme.
ilopX Aug 6, 2022
435e111
Merge pull request #77 from ilopX/fix-iteartor-doc-title
ilopX Aug 6, 2022
2f8df73
Impl iterator pattern: word iterator.
ilopX Aug 6, 2022
f121ccc
Add README.
ilopX Aug 6, 2022
46504b5
Update main README & bump version 0.37.0.
ilopX Aug 6, 2022
d35a5c9
Merge pull request #78 from ilopX/add-conceptual-iterator-pttern
ilopX Aug 6, 2022
caea3ca
Impl facade pattern.
ilopX Aug 6, 2022
b9940f9
Add README.
ilopX Aug 9, 2022
a75f0c1
Merge branch 'main' into add-facade-pattern
ilopX Aug 9, 2022
7857f4c
Bump version 0.38.0.
ilopX Aug 9, 2022
91dfc73
Merge pull request #79 from ilopX/add-facade-pattern
ilopX Aug 9, 2022
3d493c7
Fix main README.
ilopX Aug 9, 2022
8225fbb
Merge pull request #80 from ilopX/main
ilopX Aug 9, 2022
371fed0
fix inheritance
Titiaiev Mar 24, 2023
91ab74a
add cloneable interface
Titiaiev Mar 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.dart_tool/
.idea/
build/
windows/

.packages
pubspec.lock
165 changes: 165 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
## 0.38.0
- Add conceptual facade pattern.

## 0.37.0
- Add iterator pattern: Word Iterator.

## 0.36.0
- Add iterator pattern: Github Commit.

## 0.35.0
- Add conceptual command pattern.

## 0.34.0
- Add conceptual singleton pattern.

## 0.33.0
- Add conceptual builder pattern.

## 0.32.0
- Add conceptual interpreter pattern.

## 0.31.0
- Add conceptual proxy pattern.

## 0.30.0
- Add strategy pattern: View Strategy.

## 0.29.0
- Add conceptual visitor pattern.

## 0.28.0
- Add conceptual flyweight pattern.

## 0.27.0
- Add template method pattern: Data Miner.

## 0.26.0
- Add conceptual mediator pattern.

## 0.25.0
- Add conceptual state pattern: Three State.

## 0.24.1
- Add flutter icon to project links.

## 0.24.0
- Add state pattern: State Manipulator.

## 0.23.14
- Replace web renderer html to canvakit (deploy_flutter_demo.dart).

## 0.23.13
- Update demos splash screen logo (Ukraine).

## 0.23.12
- Add properties bar to "Tool Panel Factory".

## 0.23.0
- Add "Tool Panel Factory" flutter example

## 0.22.0
- Add visitor pattern: "Shape Xml Export".

## 0.21.0
- Add strategy pattern: "Reservation cargo spaces".

## 0.20.0
- Add "Conceptual Dialog Factory" example.

## 0.19.0
- Add "Conceptual Gui Factory" example.

## 0.18.0
- Add Memento Editor.

## 0.17.16 - refactoring
- Simplifying the ternary construction.
- Remove multiline comment from main README.
- Replace repository urls to relative.
- Fix relative urls.
- Fix name on diagram "Builder", rename JsonFormat to JsonConverter.
- Select pattern "Command" at the diagram.
- Add client code to "Bridge" pattern.
- Fix url position & add example name to ProductsAndBoxes example.
- Add example name to Decorator pattern.
- Format app_observer.dart.
- Connect Application to events on the AppObserver diagram.
- Split into separate files the "Memento" project.
- Remover unnecessary import.
- Move hash generator to application.
- Update SubscriberWidget diagram.
- Fix url position in FlutterAdapter README.md.

## 0.17.0
Add "Adapter" pattern: adapt a non-reactive classic type application for Flutter.

## 0.16.5
Add deploy_flutter_demos script.

## 0.16.0
- Add complex example of an Observer pattern, connected to a Flutter application.
- Add new branch "web-demos" for online examples.

## 0.15.0
- Add second "Observer" example. This example was created to be used in a more complex example.

## 0.14.0
- Add "Memento" conceptual pattern

## 0.13.0
- Add "Observer" pattern from official book, rewritten from Java example

## 0.12.19
- Refactoring: reformatting and minor changes

## 0.12.5
- Put "Shapes" prototype pattern to "Shapes" folder
- The list of patterns has been updated. Added links to projects

## 0.12.0
- Add "Command" pattern from official book, rewritten from Java example

## 0.11.0
- Add "Chain of Responsibility" pattern from official book, rewritten from Java example

## 0.10.0
- Add composite template from official book, rewritten from Java example

## 0.9.0
- Add decorator pattern. Translate from official book java example

## 0.8.5
- Add composite pattern "products_and_boxes"
- Created a Canvas helper tool for visual presentation of patterns

## 0.7.8
- Update diagram for text_graphics, clock, remote_control, color_text_format
- Code match with diagram in clock

## 0.7.0
- Add bridge pattern. Clock example

## 0.6.5
- Add bridge pattern. Device remote control

## 0.5.5
- Add example "graphics engine" and "square round conflict" for adapter patter
- Add description to prototype pattern
- Fix class diagram for text graph
- Add description Builder pattern, text formats
- Add description to car builder pattern

## 0.3.0
- Add an example graphics engine for the adapter pattern

## 0.2.0
- Add the Builder pattern using file format converters as an example

## 0.1.0
- Add pattern Prototype

## 0.0.1

- Initial project structure
- Add README
51 changes: 51 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## Contributor's Guide
We appreciate any help, whether it's a simple fix of a typo or a whole new example.
Just [make a fork](https://help.github.com/articles/fork-a-repo/),
do your change and submit a [pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).

### Step-by-step instruction
1. Just make a fork.
2. Clone the forked repository to your local machine.
3. Create a new branch and name it, for example: fix-issue-32.
4. Make changes.
5. Create commits and push them to your forked Github repository.
6. Submit a pull request to the master branch.
7. Wait for review.

### Style guide
Here's a style guide which might help you to keep your changes consistent with our code:

1. All code should meet the [Effective Dart: Style](https://dart.dev/guides/language/effective-dart/style).

2. Use [Dart Format](https://dart.dev/tools/dart-format) or auto format shortcut `Ctrl + Alt + L` in your ide.

3. Try to hard wrap the code at 80th's character. It helps to list the code on the website without scrollbars.

4. File names should match following convention: `some_class_name.dart`

5. Comments may or may not have language tags in them, such as this:
```dart
// 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 change
something in a comment like this, then do it. Even if you do it wrong, we'll tell you how
to fix it during the Pull Request.


### Build Flutter examples
```batch
cd root directory
flutter build web -t bin\main.dart
```

### Deploy flutter demos
1. Fork this repo: `https://github.com/RefactoringGuru/design-patterns-dart`
2. Apply your changes.
3. Run the script `dart bin\deploy_flutter_demos.dart`.
This script will build a web platform flutter app and push the changes to your **web-demos** branch on github.
4. You can now make a pull request on the **web-demos** branch.
5. Once approved for the merge, the web app will be available at https://refactoringguru.github.io/design-patterns-dart .
96 changes: 96 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Design Patterns in Dart
This repository is part of the [**Refactoring.Guru**](https://refactoring.guru/design-patterns) project.
It contains **Dart** examples for all classic **GoF** design patterns.

# Implementation checklist:
- [ ] **Creation**
- [x] **Abstract Factory** [[Conceptual Gui Factory](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/abstract_factory/conceptual_gui_factory)] [[![16x16](https://user-images.githubusercontent.com/8049534/171852337-57db0faf-1f5e-489a-a79a-22ed4f47b4ed.png) Tool Panel Factory](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/abstract_factory/tool_panel_factory)]
- [x] **Builder** - [[Conceptual](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/builder/conceptual)] [[Color Text Format](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/builder/color_text_format)]
- [x] **Factory Method** [[Conceptual Platform Dialog](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/factory_method/conceptual_platform_dialog)]
- [x] **Prototype** - [[Shapes](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/prototype/shapes)]
- [x] **Singleton** - [[Conceptual](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/singleton/conceptual)]
- [ ] **Behavioral**
- [x] **Chain of Responsibility** - [[Server Middleware](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/chain_of_responsibility/server_middleware)]
- [x] **Command** - [[Conceptual](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/command/conceptual)] [[Text Editor](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/command/text_editor)]
- [x] **Interpreter** - [[Conceptual](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/interpreter/conceptual)]
- [x] **Iterator** - [[Word Iterator](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/iterator/word_iterator)] [[Github Commit](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/iterator/github_commit)]
- [x] **Mediator** - [[Conceptual](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/mediator/conceptual)]
- [x] **Memento** - [[Conceptual](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/memento/conceptual)] [[![16x16](https://user-images.githubusercontent.com/8049534/171852337-57db0faf-1f5e-489a-a79a-22ed4f47b4ed.png) Memento Editor](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/memento/memento_editor)]
- [x] **Observer** - [[Open-Close Editor Events](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/observer/open_close_editor_events)] [[AppObserver](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/observer/app_observer)] [[![16x16](https://user-images.githubusercontent.com/8049534/171852337-57db0faf-1f5e-489a-a79a-22ed4f47b4ed.png) Subscriber Flutter Widget](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/observer/subscriber_flutter_widget)]
- [x] **State** - [[Conceptual](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/state/three_state)] [[![16x16](https://user-images.githubusercontent.com/8049534/171852337-57db0faf-1f5e-489a-a79a-22ed4f47b4ed.png) State Manipulator](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/state/manipulator_state)]
- [x] **Template Method** - [[Data Miner](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/template_method/data_miner)]
- [X] **Visitor** - [[Conceptual](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/visitor/conceptual)] [[Shape XML Exporter](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/visitor/shapes_exporter)]
- [X] **Strategy** [[View Strategy](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/strategy/view_strategy)] [[Reservation Cargo Spaces](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/strategy/reservation_cargo_spaces)]
- [ ] **Structural**
- [x] **Adapter** - [[Text Graphics](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/adapter/text_graphics)] [[Square Round conflict](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/adapter/square_round_conflict)] [[![16x16](https://user-images.githubusercontent.com/8049534/171852337-57db0faf-1f5e-489a-a79a-22ed4f47b4ed.png) Flutter Adapter](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/adapter/flutter_adapter)]
- [x] **Bridge** - [[Remote Device Control](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/bridge/devices_remote_control)] [[Clock](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/bridge/clock)]
- [x] **Composite** - [[Image Editor](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/composite/image_editor)] [[Products and Boxes](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/composite/products_and_boxes)]
- [x] **Decorator** - [[Data Source Decoder](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/decorator/data_source_decoder)]
- [x] **Facade** - [[Conceptual](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/facade/conceptual)]
- [x] **Flyweight** - [[Conceptual](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/flyweight/conceptual)]
- [x] **Proxy** - [[Conceptual](https://github.com/RefactoringGuru/design-patterns-dart/tree/main/patterns/proxy/conceptual)]

## Requirements
The examples were written in **Dart 2.17**.
Some complex examples require **Flutter 3.0.0**.

## Contributor's Guide
We appreciate any help, whether it's a simple fix of a typo or a whole new example.
Just [make a fork](https://help.github.com/articles/fork-a-repo/),
do your change and submit a [pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).

### Step-by-step instruction
1. Just make a fork.
2. Clone the forked repository to your local machine.
3. Create a new branch and name it, for example: fix-issue-32.
4. Make changes.
5. Create commits and push them to your forked Github repository.
6. Submit a pull request to the master branch.
7. Wait for review.

### Style guide
Here's a style guide which might help you to keep your changes consistent with our code:

1. All code should meet the [Effective Dart: Style](https://dart.dev/guides/language/effective-dart/style).

2. Use [Dart Format](https://dart.dev/tools/dart-format) or auto format shortcut `Ctrl + Alt + L` in your ide.

3. Try to hard wrap the code at 80th's character. It helps to list the code on the website without scrollbars.

4. File names should match following convention: `some_class_name.dart`

5. Comments may or may not have language tags in them, such as this:
```dart
// 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 change
something in a comment like this, then do it. Even if you do it wrong, we'll tell you how
to fix it during the Pull Request.


### Build Flutter examples
```batch
cd root directory
flutter build web -t bin\main.dart
```

### Deploy flutter demos
1. Fork this repo: `https://github.com/RefactoringGuru/design-patterns-dart`
2. Apply your changes.
3. Run the script `dart bin\deploy_flutter_demos.dart`.
This script will build a web platform flutter app and push the changes to your **web-demos** branch on github.
4. You can now make a pull request on the **web-demos** branch.
5. Once approved for the merge, the web app will be available at https://refactoringguru.github.io/design-patterns-dart .

## License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/80x15.png" /></a>


## Credits
Authors: Alexander Shvets ([@neochief](https://github.com/neochief)), ilopX ([@ilopX](https://github.com/ilopX))
29 changes: 29 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

linter:
rules:
library_private_types_in_public_api: false
# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
Loading