-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
Amayyas edited this page Dec 5, 2025
·
3 revisions
Thank you for your interest in contributing to Flutter AI SDK! This document provides guidelines for contributing.
Please be respectful and constructive in all interactions. We aim to create a welcoming environment for everyone.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/Flutter-AI-SDK.git cd Flutter-AI-SDK
# Install dependencies
flutter pub get
# Run tests to verify setup
flutter testgit checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix- Follow the Dart Style Guide
- Use
flutter analyzeto check for issues - Format code with
dart format .
- Add dartdoc comments for all public APIs
- Include code examples in documentation
- Update wiki if adding new features
- Write tests for new features
- Maintain test coverage
- Run all tests before submitting:
flutter test
Use clear, descriptive commit messages:
git commit -m "feat: add support for audio content"
git commit -m "fix: handle rate limit errors correctly"
git commit -m "docs: update streaming documentation"-
feat:- New feature -
fix:- Bug fix -
docs:- Documentation only -
test:- Adding tests -
refactor:- Code refactoring -
chore:- Maintenance tasks
git push origin feature/your-feature-name- Go to the original repository
- Click "New Pull Request"
- Select your branch
- Fill in the PR template
- Submit the PR
Use a clear, descriptive title:
- ✅ "Add support for Gemini 1.5 models"
- ✅ "Fix streaming error handling in Anthropic provider"
- ❌ "Update code"
- ❌ "Fix bug"
Include:
- What changes were made
- Why the changes were needed
- How to test the changes
- Any breaking changes
- Code follows style guidelines
- Tests added/updated
- Documentation updated
- All tests pass
- No new warnings from analyzer
Include:
- Flutter AI SDK version
- Flutter version
- Provider being used
- Steps to reproduce
- Expected vs actual behavior
- Error messages/stack traces
Include:
- Clear description of the feature
- Use case / motivation
- Proposed API (if applicable)
- Examples of usage
# Run all tests
flutter test
# Run specific test file
flutter test test/models/content_test.dart
# Run tests with coverage
flutter test --coverageFor testing with actual API providers:
-
Create a
.envfile (not committed):OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-ant-... GOOGLE_AI_API_KEY=AIza... -
Run integration tests:
flutter test test/integration/
Enable debug logging:
import 'package:flutter_ai_sdk/flutter_ai_sdk.dart';
// Enable verbose logging
AILogger.level = LogLevel.verbose;lib/
├── flutter_ai_sdk.dart # Main export
└── src/
├── flutter_ai.dart # Main class
├── config/ # Configuration
├── context/ # Context management
├── errors/ # Error types
├── models/ # Data models
├── providers/ # Provider implementations
└── utils/ # Utilities
test/
├── config/ # Config tests
├── context/ # Context tests
├── errors/ # Error tests
├── models/ # Model tests
└── integration/ # Integration tests
- Check existing issues
- Ask in discussions
- Read the wiki
Thank you for contributing! 🎉
Getting Started
Core Concepts
Advanced Features
API Reference
Examples
Other