Contributing to Flyer Chat 💬
First off, thank you for considering contributing to Flyer Chat! 🎉 We welcome any contributions that help make this project better, from reporting bugs and suggesting features to submitting code changes.
This document provides guidelines for contributing to the project.
We expect all contributors to adhere to our Code of Conduct. Please read it to understand the standards we strive for.
There are many ways to contribute:
- Reporting Bugs: If you find a bug, please report it by opening an issue.
- Suggesting Enhancements: Have an idea for a new feature or an improvement? Open a discussion to share your thoughts with the community.
- Improving Documentation: Spot a typo or think something could be clearer? Let us know by opening an issue.
- Writing Code: Help fix bugs or implement new features.
- Creating Examples/Packages: Follow the steps below to add new examples or packages.
Before creating a new issue:
- Search existing issues and/or discussions: Check if the bug or feature request has already been reported or suggested.
- Provide details: If creating a new issue, please include as much detail as possible. For bugs, include steps to reproduce, expected behavior, actual behavior, Flutter version, and package versions. For enhancements, explain the motivation and proposed solution.
- Flutter SDK
- Melos: Install via
dart pub global activate melos
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/flutter_chat_ui.git - Navigate to the project directory:
cd flutter_chat_ui - Bootstrap the project using Melos (installs dependencies for all packages):
melos bootstrapormelos bs
- Navigate to the examples directory:
cd examples - Create the Flutter project:
flutter create example_name --org chat.flyer
- Return to the root directory:
cd .. - Bootstrap Melos to link packages:
melos bs
- Replace the content of
examples/example_name/analysis_options.yamlwith:include: ../../analysis_options.yaml
- Navigate to the packages directory:
cd packages - Create the Flutter package:
flutter create --template=package package_name
- Return to the root directory:
cd .. - Bootstrap Melos:
melos bs
- Replace the content of
packages/package_name/analysis_options.yamlwith:include: ../../analysis_options.yaml
- Structure the package similarly to existing ones. Essential files include:
Remove unnecessary generated files and update
lib/ src/ # Your Dart code package_name.dart # Exports analysis_options.yaml CHANGELOG.md LICENSE pubspec.yaml README.mdpubspec.yaml. - Run
melos bsagain after modifyingpubspec.yaml.
- Get/Link Dependencies:
melos bootstrapormelos bs - Clean:
melos clean(removes build artifacts, pub caches, etc.) - Run All Tests:
melos test - Run Tests Selectively:
melos run test:selective(prompts for package selection) - Generate Coverage:
melos coverage - Generate Coverage Selectively:
melos run coverage:selective - Analyze Code:
melos analyze - Format Code:
melos format - Apply Fixes:
melos run fix - (flutter_chat_core) Build Runner:
melos run build
Please adhere to the code style defined in the root analysis_options.yaml file.
- Run
melos formatto format your code before committing. - Run
melos analyzeto check for static analysis issues.
- Ensure you have followed the Development Setup.
- Create a new branch for your changes based on the
mainbranch:git checkout main git pull origin main # Ensure you have the latest changes git checkout -b your-branch-name # e.g., fix/message-bug or feat/new-message-type
- Make your code changes.
- Add relevant tests for your changes.
- Run tests:
melos test - Format code and check analysis:
melos format && melos analyze - Commit your changes with a clear and concise commit message.
- Push your branch to your fork:
git push origin your-branch-name
- Open a Pull Request (PR) from your fork's branch to the
flyerhq/flutter_chat_uimainbranch. - Provide a clear description of your PR, explaining the changes and linking to any relevant issues (e.g.,
Fixes #123). - Respond to any feedback or requested changes from the maintainers.
By contributing, you agree that your contributions will be licensed under the Apache License 2.0 that covers the project.