Welcome to the Instabug Flutter SDK monorepo! This repository contains the official Flutter packages for integrating Instabug - a comprehensive bug reporting, crash monitoring, and user feedback platform for mobile apps.
This monorepo houses four interconnected packages that work together to provide seamless Instabug integration for Flutter applications:
- instabug_flutter - The main SDK with bug reporting, crash monitoring, APM, surveys, and more
- instabug_dio_interceptor - Network request logging for Dio HTTP client
- instabug_http_client - Network request logging for the standard http package
- instabug_flutter_modular - Screen loading tracking for Flutter Modular routing
Each package has its own README with detailed usage instructions and examples.
Contributing to this project? Here's how to get your development environment ready.
- Flutter SDK (3.0.0 or higher recommended)
- FVM for Flutter version management (optional but recommended)
- Git for version control
-
Clone the repository
git clone https://github.com/Instabug/Instabug-Flutter.git cd Instabug-Flutter -
Set up Flutter version (if using FVM)
fvm use fvm flutter --version
-
Navigate to the package you want to work on
cd packages/instabug_flutter # or any other package
-
Install dependencies
fvm flutter pub get # or just 'flutter pub get' if not using FVM -
Generate required code (important!)
# Generate Pigeon API bindings (in instabug_flutter package) ./scripts/pigeon.sh # Generate mock files for testing (in any package with tests) fvm dart run build_runner build
This project uses Pigeon to generate type-safe platform channel code and build_runner with Mockito for test mocks. If you see import errors in your IDE after cloning, running the generation commands above will resolve them.
Note: Generated files are git-ignored (as they should be), so you'll need to run these commands whenever you:
- Clone the repo fresh
- Switch branches that modify Pigeon definitions
- Add new test files that need mocks
packages/
├── instabug_flutter/ # Main SDK package
│ ├── lib/ # Dart source code
│ ├── android/ # Android platform code
│ ├── ios/ # iOS platform code
│ ├── pigeons/ # Pigeon API definitions
│ ├── scripts/ # Development scripts
│ └── test/ # Unit tests
├── instabug_dio_interceptor/ # Dio HTTP integration
├── instabug_http_client/ # Standard HTTP integration
└── instabug_flutter_modular/ # Flutter Modular integration
Each package is independently published to pub.dev but they're developed together in this monorepo for easier maintenance and testing.
cd packages/[package-name]
fvm flutter testMost packages include example apps to test functionality:
cd packages/[package-name]/example
fvm flutter runEach package manages its own pubspec.yaml. Make sure to:
- Add dependencies to the correct package
- Run
flutter pub getin that package directory - Update version constraints appropriately
Problem: IDE shows import errors for generated files
Solution: Run the code generation steps above
Problem: ./scripts/pigeon.sh: Permission denied
Solution: Make the script executable: chmod +x scripts/pigeon.sh
Problem: IDE can't find Flutter SDK when using FVM
Solution: Point your IDE to the FVM Flutter path (usually ~/.fvm/versions/[version])
Problem: Cached build artifacts cause issues
Solution: Clean and regenerate:
fvm flutter clean
fvm flutter pub get
./scripts/pigeon.sh # if in instabug_flutter package
fvm dart run build_runner buildWe welcome contributions! Here's how to get started:
- Fork the repository and create a feature branch
- Set up your development environment (follow steps above)
- Make your changes with appropriate tests
- Run the test suite to ensure nothing breaks
- Submit a pull request with a clear description
- Run
flutter analyzeto catch static analysis issues - Run
flutter testto ensure all tests pass - Update documentation if you're changing public APIs
- Follow the existing code style and conventions
- ** Documentation**: Check individual package READMEs for usage examples
- ** Bug Reports**: Create an issue with reproduction steps
- ** Questions**: Use GitHub Discussions for general questions