Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CONTRIBUTING.md #56535

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,28 @@ $ ./run_tests.py --variant=host_debug_unopt_arm64 --type=engine

Googlers contributing to Fuchsia should follow the additional steps at:
go/flutter-fuchsia-pr-policy.


<h1>The Flutter engine is a critical component of the Flutter framework, responsible for rendering graphics, handling input, and managing the app's lifecycle. Occasionally, developers may encounter issues related to the engine. Here are some common problems and their potential solutions: </h1>

**1. Performance Issues:**
- **Shader Compilation Jank:** Flutter apps might experience stuttering due to runtime shader compilation. To address this, Flutter introduced the Impeller rendering engine, which precompiles shaders to ensure smoother performance. Impeller is enabled by default on iOS and is available for testing on other platforms.

**2. Memory Management:**
- **High Memory Usage with Multiple Engines:** When integrating multiple Flutter instances in an app, developers have reported increased memory consumption. The Flutter team has been working on lightweight engine solutions to mitigate this issue. It's advisable to monitor the project's progress for updates.

**3. Platform-Specific Errors:**
- **macOS Initialization Failure:** Some developers have encountered errors like "Failed to initialize Flutter engine: error 2" on macOS. This can result from incorrect asset paths or missing configurations. Ensuring that the `flutter_assets` directory is correctly referenced in the project settings can resolve this issue.

**4. Deprecated APIs:**
- **Outdated Code:** As Flutter evolves, certain APIs become deprecated. Using the `flutter fix` tool helps identify and update deprecated code, ensuring compatibility with the latest Flutter versions.

**5. Known Bugs and Issues:**
- **GitHub Issue Tracker:** The Flutter community actively reports and tracks issues on GitHub. Regularly checking the [Flutter GitHub Issues](https://github.com/flutter/flutter/issues) page can provide insights into current problems and their resolutions.

**Best Practices:**
- **Stay Updated:** Regularly update your Flutter SDK to benefit from the latest fixes and improvements.
- **Consult Release Notes:** Reviewing the [Flutter release notes](https://docs.flutter.dev/release/release-notes) offers information on new features and known issues.
- **Engage with the Community:** Participating in Flutter forums and discussions can provide solutions and workarounds from fellow developers.

By staying informed and proactive, you can effectively address and mitigate issues related to the Flutter engine.