The following steps will get you up and running to contribute to this package:
-
Fork the repo
-
Clone your fork locally
-
Setup all the dependencies and packages by running
yarn && flutter pub get
. -
Run
yarn check:all
anytime to ensure format, typing aren't broken.
Before you create a Pull Request, please check whether your commits comply with the commit conventions used in this repository.
Rules through commitlint are applied, and correct commit messages can be created with git cz through commitizen.
When you create a commit we kindly ask you to follow the convention
category(scope or module, optional): message
in your commit message while using one of
the following categories:
feat / feature
: all changes that introduce completely new code or new featuresfix
: changes that fix a bug (ideally you will additionally reference an issue if present)refactor
: any code related change that is not a fix nor a featuredocs
: changing existing or creating new documentation (i.e. README, docs for usage of a lib or cli usage)build
: all changes regarding the build of the software, changes to dependencies or the addition of new dependenciestest
: all changes regarding tests (adding new tests or changing existing ones)ci
: all changes regarding the configuration of continuous integration (i.e. github actions, ci system)chore
: all changes to the repository that do not fit into any of the above categories
If you are interested in the detailed specification you can visit https://www.conventionalcommits.org/ or check out the Angular Commit Message Guidelines.
Flutter plugins follow Google style—or Flutter style for Dart—for the languages they use, and use auto-formatters:
- Dart: formatted with
dart format
- Swift: formatted with swiftformat the config file is ios/.swiftformat
If you fix a bug or create a new feature, then you should write or modify comment of source code with dart doc style.
Any function or parameter should be described in dart doc comment and README.md
If you think any code should be described itself, then write code with inline comment at that line.
-
Fork of the this repository and clone your fork
-
Create a new branch out of the
main
branch. -
Make and commit your changes following the commit convention. As you develop, you can run
yarn check:all
and to make sure everything works as expected. -
You should base branch of PR as
main
.
If you change dart code, open this repository with IDE and change it.
If you change swift code, open example/ios/Runner.xcworkspace
with Xcode and edit code at Pods/Development Pods/pencil_kit/../../example/ios/.symlinks/plugins/pencil_kit/ios/Classes
Please refer to the following picture.
While developing, you can run the example app to test your changes. If you change any native code, then you'll need to rebuild the example app.
By contributing your code to the flutter-pencilkit GitHub repository, you agree to license your contribution under the MIT license.