Thank you for your interest in contributing! This guide will help you get started.
- Flutter SDK 3.24+ (check
.fvmrcfor the pinned version) - Melos (
dart pub global activate melos) - A physical Android device connected via USB (for scrcpy features)
# Clone the repo
git clone https://github.com/sunbird89629/scrcpy_flutter.git
cd scrcpy_flutter
# Install dependencies and link local packages
melos bootstrap
# Run codegen (freezed, json_serializable, slang)
melos run gen
melos run gen:i18ncd scrcpy_flutter && flutter run -d macos # Scrcpy Flutter client app
cd scrcpy_app && flutter run -d macos # Scrcpy client app
cd scrcpy_plus && flutter run -d macos # macOS menu-bar appmelos run analyze # Static analysis (fatal infos + warnings)
melos run format # Check formatting
melos run format:fix # Auto-fix formatting
melos run test # Run all testsAfter modifying freezed models, JSON serializable classes, or i18n strings:
melos run gen # Regenerate freezed/json_serializable
melos run gen:i18n # Regenerate slang i18n stringsThis is a Melos-managed monorepo. Lower layers must never import from upper layers.
packages/adb_tools ────────────────────┐
logger_utils (sibling repo) ───────────┤
scrcpy_view (widget/protocol) ────────┼──> scrcpy_app / scrcpy_flutter / scrcpy_plus
└──> scrcpy_mcp (MCP server)
| Package | Description |
|---|---|
scrcpy_view |
Reusable Flutter widget + protocol library for Android screen mirroring |
scrcpy_app |
Standalone scrcpy desktop client |
scrcpy_flutter |
Scrcpy Flutter client (screen mirroring + MCP panel) |
scrcpy_plus |
macOS menu-bar app for device management + scrcpy launcher |
scrcpy_mcp |
MCP server wrapping scrcpy operations |
packages/adb_tools |
ADB client (shell, forward, push, pair, connect) + binary manager |
- Analysis rules: very_good_analysis (configured in root
analysis_options.yaml) - Use
initLogging()/ hierarchicalLoggerfrompackage:logger_utils— neverprint() - Follow existing patterns in the codebase; check neighboring files before introducing new ones
# Run all tests
melos run test
# Run tests for a specific package
cd packages/adb_tools && flutter test- Tests requiring a physical Android device go in
*_real_device_test.dart - Use the
ScrcpyAdbinterface for testing without a real device - Never add the
testpackage as a dev_dependency — it conflicts withflutter_testfrom the SDK
- Fork the repository
- Create a feature branch from
main - Make your changes
- Ensure
melos run analyzeandmelos run testpass - Commit with clear, descriptive messages
- Open a pull request
Use GitHub Issues to report bugs or request features. Include:
- Steps to reproduce
- Expected vs actual behavior
- Flutter version (
flutter --version) - macOS version
- Android device model and OS version (if applicable)
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.