|
| 1 | +## Contributor's Guide |
| 2 | +We appreciate any help, whether it's a simple fix of a typo or a whole new example. |
| 3 | +Just [make a fork](https://help.github.com/articles/fork-a-repo/), |
| 4 | +do your change and submit a [pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). |
| 5 | + |
| 6 | +### Step-by-step instruction |
| 7 | +1. Just make a fork. |
| 8 | +2. Clone the forked repository to your local machine. |
| 9 | +3. Create a new branch and name it, for example: fix-issue-32. |
| 10 | +4. Make changes. |
| 11 | +5. Create commits and push them to your forked Github repository. |
| 12 | +6. Submit a pull request to the master branch. |
| 13 | +7. Wait for review. |
| 14 | + |
| 15 | +### Style guide |
| 16 | +Here's a style guide which might help you to keep your changes consistent with our code: |
| 17 | + |
| 18 | +1. All code should meet the [Effective Dart: Style](https://dart.dev/guides/language/effective-dart/style). |
| 19 | + |
| 20 | +2. Use [Dart Format](https://dart.dev/tools/dart-format) or auto format shortcut `Ctrl + Alt + L` in your ide. |
| 21 | + |
| 22 | +3. Try to hard wrap the code at 80th's character. It helps to list the code on the website without scrollbars. |
| 23 | + |
| 24 | +4. File names should match following convention: `some_class_name.dart` |
| 25 | + |
| 26 | +5. Comments may or may not have language tags in them, such as this: |
| 27 | + ```dart |
| 28 | + // EN: All products families have the same varieties (MacOS/Windows). |
| 29 | + // This is a MacOS variant of a button. |
| 30 | + |
| 31 | + // RU: Все семейства продуктов имеют одни и те же вариации (MacOS/Windows). |
| 32 | + // Это вариант кнопки под MacOS. |
| 33 | + ``` |
| 34 | + Don't be scared and ignore the non-English part of such comments. If you want to change |
| 35 | + something in a comment like this, then do it. Even if you do it wrong, we'll tell you how |
| 36 | + to fix it during the Pull Request. |
| 37 | +
|
| 38 | +
|
| 39 | +### Build Flutter examples |
| 40 | +```batch |
| 41 | +cd root directory |
| 42 | +flutter build web -t bin\main.dart |
| 43 | +``` |
| 44 | + |
| 45 | +### Deploy flutter demos |
| 46 | +1. Fork this repo: `https://github.com/RefactoringGuru/design-patterns-dart` |
| 47 | +2. Apply your changes. |
| 48 | +3. Run the script `dart bin\deploy_flutter_demos.dart`. |
| 49 | +This script will build a web platform flutter app and push the changes to your **web-demos** branch on github. |
| 50 | +4. You can now make a pull request on the **web-demos** branch. |
| 51 | +5. Once approved for the merge, the web app will be available at https://refactoringguru.github.io/design-patterns-dart . |
0 commit comments