Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion patterns/state/three_state/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ changes. It appears as if the object changed its class.
Tutorial: [here](https://refactoring.guru/design-patterns/state).

### Diagram:
![image](https://user-images.githubusercontent.com/8049534/172000870-a96c6dd2-5b6a-4a64-b3a9-4edb75dd8076.png)
![image](https://user-images.githubusercontent.com/8049534/172001291-8d87a3c8-b694-45c3-bd46-40211cd9ac45.png)

### Client code:
```dart
Expand All @@ -20,3 +20,11 @@ void main() {
switcher.call(); // call:(4) One
}
```

### Output:
```
call(1): One
call(2): Two
call(3): Three
call(4): One
```