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

Document when to use pluginFfi vs plugin #7428

Merged
merged 2 commits into from
Aug 17, 2022
Merged

Document when to use pluginFfi vs plugin #7428

merged 2 commits into from
Aug 17, 2022

Conversation

dcharkes
Copy link
Contributor

@dcharkes dcharkes commented Aug 5, 2022

Adds documentation from the questions answered in:

Presubmit checklist

Adds documentation from the questions answered in:

* flutter/flutter#108974
bundling native code, but FFI plugin packages do not support
method channels and do include method channel registration code.
If you want to implement a plugin that uses both method channels
and FFI, use a (non-FFI) plugin. You can chose this per platform.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last sentence probably needs a bit of rework to make it accessible to all our developers. /cc @sfshaza2

@sfshaza2
Copy link
Contributor

Daco, I can no longer find the GitHub example you linked to. Can you share it again?

@dcharkes
Copy link
Contributor Author

@sfshaza2 did you mean this one?

  ///     flutter:
  ///      plugin:
  ///        platforms:
  ///          android:
  ///            package: io.flutter.plugins.sample
  ///            pluginClass: SamplePlugin
  ///          ios:
  ///            # A plugin implemented through method channels.
  ///            pluginClass: SamplePlugin
  ///          linux:
  ///            # A plugin implemented purely in Dart code.
  ///            dartPluginClass: SamplePlugin
  ///          macos:
  ///            # A plugin implemented with `dart:ffi`.
  ///            ffiPlugin: true
  ///          windows:
  ///            # A plugin using platform-specific Dart and method channels.
  ///            dartPluginClass: SamplePlugin
  ///            pluginClass: SamplePlugin

https://github.com/dcharkes/flutter/blob/91ef6ee700b9e281539e7734f5974bc5184894fa/packages/flutter_tools/lib/src/plugins.dart#L45-L63

Copy link
Contributor

@sfshaza2 sfshaza2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Landing this for now, though I did want to tweak a bit. But I'd like to land before freezing the website.

@sfshaza2 sfshaza2 merged commit b951e81 into main Aug 17, 2022
@sfshaza2 sfshaza2 deleted the ffi-plugin-doc branch August 17, 2022 15:34
jmagman pushed a commit to jmagman/website that referenced this pull request Aug 18, 2022
* Document when to use pluginFfi vs plugin

Adds documentation from the questions answered in:

* flutter/flutter#108974

* clarify sentence
khanhnwin added a commit that referenced this pull request Aug 30, 2022
* update build.yml and restore PR template

* Document when to use pluginFfi vs plugin (#7428)

* Document when to use pluginFfi vs plugin

Adds documentation from the questions answered in:

* flutter/flutter#108974

* clarify sentence

* Update iOS minimum version documentation to 11.0 (#62)

* Bump github/codeql-action from 2.1.18 to 2.1.19 (#63)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.18 to 2.1.19.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@2ca79b6...f5d217b)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [Windows] Document how to set exe's version info (#60)

* Tweak

* Tweak

* Add migration guide

* Polish

* Update src/deployment/windows.md

Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>

* Fix examples for flutter beta (#64)

* dart fix add_languages examples

* fix examples/layout/constraints

* fix examples/cookbook/effects/stagger_menu_animation

* fix examples/ui/advanced/actions_and_shortcut

* refresh excerpts

* update build.yml setting beta experimental = false

* Bump github/codeql-action from 2.1.19 to 2.1.20 (#65)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.19 to 2.1.20.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@f5d217b...7fee4ca)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Khanh Nguyen <khanhnwin@gmail.com>

* Bump firebase-tools from 11.7.0 to 11.8.0 (#66)

Bumps [firebase-tools](https://github.com/firebase/firebase-tools) from 11.7.0 to 11.8.0.
- [Release notes](https://github.com/firebase/firebase-tools/releases)
- [Commits](firebase/firebase-tools@v11.7.0...v11.8.0)

---
updated-dependencies:
- dependency-name: firebase-tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Khanh Nguyen <khanhnwin@gmail.com>

* Add instructions for enabling Developer Mode on iOS 16 (#67)

* Add instructions for enabling Developer Mode on iOS 16

* Review edits

* Bump pigeon in /examples/development/platform_integration (#69)

Bumps [pigeon](https://github.com/flutter/packages/tree/main/packages) from 3.2.9 to 4.0.0.
- [Release notes](https://github.com/flutter/packages/releases)
- [Commits](https://github.com/flutter/packages/commits/pigeon-v4.0.0/packages)

---
updated-dependencies:
- dependency-name: pigeon
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix broken PR link at bottom of splashScreenView breaking change (#68)

* Update breaking changes  (#70)

* links flutter 3.0 breaking changes to master api docs

* updated breaking changes

* updated breaking changes

* Bump github/codeql-action from 2.1.20 to 2.1.21 (#74)

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.20 to 2.1.21.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@7fee4ca...c7f292e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Adding warning about named routes (#73)

* stashing

* Adding notes warning about named routes.

* Reverting to previous whats-new file

* Update error docs to use PlatformDispatcher instead of Zones (#71)

* Update error docs to use PlatformDispatcher instead of Zones

* refresh code excerpts

* tweak example code

* Remove random apostrophe

Co-authored-by: Khanh Nguyen <khanhnwin@gmail.com>

* Update navigation and routing documentation (#72)

* Update navigation and routing documentation

* Update src/development/ui/navigation/index.md

* Update src/development/ui/navigation/index.md

* Update src/development/ui/navigation/index.md

* Update src/development/ui/navigation/index.md

* Update src/development/ui/navigation/index.md

* Update WillPopScope note

* Apply suggestions from code review

Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>

* Update src/development/ui/navigation/index.md

Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Khanh Nguyen <khanhnwin@gmail.com>

* update release notes (#75)

* update release notes

* Update src/development/tools/sdk/release-notes/release-notes-3.3.0.md

Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>

* Update URL Strategies page (#76)

* Add what's new section for 3.3 (#77)

* stashing

* Updating the what's new page for 3.3

* Tweaking, as per feedback

* Adding release notes to index file (#78)

* Adding release notes to index file

* Update index.md

Co-authored-by: Khanh Nguyen <khanhnwin@gmail.com>

* Tweaking some things... (#79)

* Tweaking some things...

* Update whats-new.md

Co-authored-by: Khanh Nguyen <khanhnwin@gmail.com>

* revert build.yml for public repo

* fix some links

* fix PlatformDispatcher link anchor

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Daco Harkes <dacoharkes@google.com>
Co-authored-by: Jenn Magder <magder@google.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
Co-authored-by: Shams Zakhour (ignore Sfshaza) <44418985+sfshaza2@users.noreply.github.com>
Co-authored-by: Shamira <23406866+MiraMarshall@users.noreply.github.com>
Co-authored-by: Dan Field <dnfield@google.com>
Co-authored-by: John Ryan <ryjohn@google.com>
Co-authored-by: Kevin Chisholm <kevinjchisholm@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants