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

Add reference documentation that lists all possible plugin configuration in pubspec.yaml #11334

Open
1 task
loic-sharma opened this issue Oct 26, 2024 · 0 comments

Comments

@loic-sharma
Copy link
Member

Page URL

https://docs.flutter.dev/packages-and-plugins/developing-packages/

Page source

https://github.com/flutter/website/tree/main/src/content/packages-and-plugins/developing-packages.md

Describe the problem

When you create a Flutter plugin, you configure it in the pubspec.yaml file. For example:

flutter:
  plugin:
    platforms:
      ios:
        pluginClass: HelloPlugin
        sharedDarwinSource: true

This configuration is mostly explained in this guide: https://docs.flutter.dev/packages-and-plugins/developing-packages

Expected fix

It would be useful to have a reference page that contains a table with entries for all possible configuration values. For example:

Configuration path Type Example Description
flutter.plugin.platforms.<platform>.pluginClass String HelloPlugin The native type that registers the plugin.
On iOS, this must implement FlutterPlugin.
flutter.plugin.platforms.<ios/macos>.sharedDarwinSource Bool true Used to share native code for the iOS and macOS platforms.

If true, uses the darwin directory for native code.
If false, uses the macos directory for macOS plugins and the ios directory for iOS plugins.

Additional context

This was suggested by @jonasf here: https://github.com/dart-lang/pana/pull/1412/files#r1816312072

I would like to fix this problem.

  • I will try and fix this problem on docs.flutter.dev.
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

No branches or pull requests

2 participants
@loic-sharma and others