Conversation
Summary of ChangesHello @dcharkes, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the Flutter documentation to align with current best practices for integrating native code using Dart FFI. It deprecates the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request does a great job of removing references to the legacy plugin_ffi template and updating the documentation to favor the modern package_ffi approach. The changes are clear and well-aligned with the stated goal. I've added a couple of minor suggestions to ensure the documentation for edge cases, where the standard plugin template is now recommended, is fully comprehensive.
| If you need to access the Flutter Plugin API or configure a Google Play | ||
| services runtime on Android, use the `flutter create --template=plugin` | ||
| command instead. |
There was a problem hiding this comment.
The note about when to use the standard plugin template is missing a use case. The legacy plugin_ffi template was also used for static linking on iOS or macOS. According to the related issue, this case should also be covered by the standard plugin template. It would be good to include this for completeness.
| If you need to access the Flutter Plugin API or configure a Google Play | |
| services runtime on Android, use the `flutter create --template=plugin` | |
| command instead. | |
| If you need to access the Flutter Plugin API, configure a Google Play | |
| services runtime on Android, or use static linking on iOS or macOS, | |
| use the `flutter create --template=plugin` command instead. |
There was a problem hiding this comment.
Well, yes and no. The Plugin (non-FFI) template doesn't help you with the setup like the FFI plugin template did. No CMakeList.txt and C source code are provided.
| If you need to use the Flutter Plugin API, or if you need to configure a Google | ||
| Play services runtime on Android, use the standard plugin template (`flutter create | ||
| --template=plugin`). |
There was a problem hiding this comment.
This paragraph is missing a use case for the standard plugin template. The legacy plugin_ffi template was also used for static linking on iOS or macOS, which is now a use case for the standard plugin template. It would be beneficial to add this information here for users who land on this page.
| If you need to use the Flutter Plugin API, or if you need to configure a Google | |
| Play services runtime on Android, use the standard plugin template (`flutter create | |
| --template=plugin`). | |
| If you need to use the Flutter Plugin API, configure a Google Play services | |
| runtime on Android, or use static linking on iOS or macOS, use the standard | |
| plugin template (`flutter create --template=plugin`). |
|
Visit the preview URL for this PR (updated for commit eeaebb7): https://flutter-docs-prod--pr13004-deprecate-plugin-ffi-uj153fj4.web.app |
The new way of bundling native code is
flutter create --template=package_ffi. (Or if the Flutter Plugin API or Android Play components need to be bundled:flutter create --template=plugin.)Issue:
Related PRs:
plugin_ffitemplate flutter#181588(We should submit this PR before that one.)