Thank you for your interest in contributing to Flutter Flatseal! This document provides guidelines and instructions for contributing.
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
Before creating bug reports, please check existing issues. When creating a bug report, include:
- Clear title and description
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- System information:
- OS and version
- Flutter version (
flutter --version) - Flatpak version (
flatpak --version)
- Screenshots if applicable
- Error messages or logs
Enhancement suggestions are welcome! Please include:
- Clear description of the feature
- Use case - why is this useful?
- Examples from other applications (if applicable)
- Implementation ideas (optional)
-
Fork the repository
git clone https://github.com/meta-flutter/flutter-flatseal.git cd flutter-flatseal -
Create a feature branch
git checkout -b feature/my-new-feature
-
Make your changes
- Follow the coding style
- Write clear commit messages
- Add tests if applicable
- Update documentation
-
Test your changes
flutter test flutter analyze flutter build linux --release -
Commit your changes
git add . git commit -m "Add feature: description"
-
Push to your fork
git push origin feature/my-new-feature
-
Create a Pull Request
- Use a clear title
- Describe your changes
- Reference related issues
- Add screenshots for UI changes
# Install Flutter
# See: https://docs.flutter.dev/get-started/install
# Install dependencies
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev flatpak
# Clone and setup
git clone https://github.com/meta-flutter/flutter-flatseal.git
cd flutter-flatseal
flutter pub get# Development mode
flutter run -d linux
# With hot reload enabled
flutter run -d linux --hot# All tests
flutter test
# Specific test file
flutter test test/widget_test.dart
# With coverage
flutter test --coverageFollow the Dart Style Guide:
// Good
class MyClass {
final String name;
MyClass({required this.name});
void doSomething() {
// implementation
}
}
// Use const constructors when possible
const MyWidget({super.key});
// Use trailing commas
MyWidget(
child: Text('Hello'),
onTap: () {},
);# Format all Dart files
flutter format lib/
# Check formatting without modifying
flutter format --set-exit-if-changed lib/# Run analyzer
flutter analyze
# Fix auto-fixable issues
dart fix --apply- Use descriptive names:
PermissionListItemnotItem - Suffix with widget type:
HomeScreen,AppList, etc. - Use
State<T>for stateful widgets:_HomeScreenState
lib/
├── main.dart # App entry point
├── models/ # Data models
├── services/ # Business logic
├── screens/ # Full-screen views
├── widgets/ # Reusable components
└── utils/ # Helper functions
Use clear, descriptive commit messages:
# Good
Add permission override functionality
Fix crash when no apps are installed
Update README with build instructions
Refactor FlatpakService to use async/await
# Bad
fix bug
update stuff
wip
<type>: <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting)refactor: Code refactoringtest: Test additions/changeschore: Build/tooling changes
Example:
feat: Add D-Bus permission management
Implement functionality to view and modify D-Bus permissions
for Flatpak applications. Includes both session and system bus
support.
Closes #42
test('FlatpakApp can be created', () {
final app = FlatpakApp(
id: 'org.example.App',
name: 'Example App',
version: '1.0.0',
branch: 'stable',
origin: 'flathub',
);
expect(app.id, 'org.example.App');
});testWidgets('App list displays apps', (WidgetTester tester) async {
await tester.pumpWidget(
MaterialApp(
home: AppList(apps: testApps),
),
);
expect(find.text('Test App'), findsOneWidget);
});Place integration tests in integration_test/:
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
testWidgets('Full app flow', (tester) async {
// Test complete user flow
});
}/// Service to interact with Flatpak command-line tools.
///
/// Provides methods to:
/// - List installed applications
/// - View application permissions
/// - Override permissions
/// - Reset overrides
class FlatpakService extends ChangeNotifier {
// Implementation
}Update README.md when:
- Adding new features
- Changing requirements
- Modifying build process
- Adding new dependencies
- Update documentation if needed
- Add tests for new functionality
- Ensure all tests pass
- Run code analysis and fix issues
- Update CHANGELOG.md (if applicable)
- Request review from maintainers
- Address feedback promptly
- Code follows project style guidelines
- Tests added/updated and passing
- Documentation updated
- No breaking changes (or documented)
- Commit messages are clear
- PR description is complete
Looking for ways to contribute? Consider:
- Add D-Bus permission management
- Implement environment variable overrides
- Add custom filesystem path support
- Create integration tests
- Improve error handling
- Add permission presets/profiles
- Implement import/export functionality
- Add search filters
- Create mobile-responsive layout
- Add keyboard shortcuts
- Video tutorials
- More screenshots
- Troubleshooting guide
- Comparison with original Flatseal
- Flatpak permission guide
- Increase test coverage
- Add performance tests
- Test on various distributions
- Accessibility testing
- Open an issue for questions
- Check existing documentation
- Review closed issues and PRs
Contributors will be acknowledged in:
- CONTRIBUTORS.md file
- Release notes
- Project README
Thank you for contributing to Flutter Flatseal!