Update the flutter create -t plugin document to reflect changes related to --platforms#4344
Update the flutter create -t plugin document to reflect changes related to --platforms#4344sfshaza2 merged 3 commits intoflutter:masterfrom
flutter create -t plugin document to reflect changes related to --platforms#4344Conversation
Update the document to reflect changes in flutter/flutter#59507
| To create a plugin package, use the `--template=plugin` | ||
| flag with `flutter create`. | ||
|
|
||
| Starting from flutter 1.20.0: |
There was a problem hiding this comment.
=> As of Flutter 1.20.0, use...
src/docs/development/packages-and-plugins/developing-packages.md
Outdated
Show resolved
Hide resolved
| Starting from flutter 1.20.0: | ||
| Use the `--platforms` option to specify all the platforms that the plugin | ||
| supports. Available platforms are: android, ios, web, linux, macos and windos. | ||
| If no platforms are specified, a plugin project supports no platforms will be created. |
There was a problem hiding this comment.
=> If no platforms are specified, the resulting project doesn't support any platforms.
Really? This seems like a bug. :)
There was a problem hiding this comment.
Done. Haha, it is intended. We don't want the user to accidentally create a plugin project supporting platforms that they don't want to support. We wanted to make it more explicit.
src/docs/development/packages-and-plugins/developing-packages.md
Outdated
Show resolved
Hide resolved
| ``` | ||
| ```terminal | ||
| $ flutter create --template=plugin -a java hello | ||
| $ flutter create --template=plugin --platforms=android,ios -a java hello |
There was a problem hiding this comment.
So, ALL of these examples use Android and iOS. Could we mix it up a bit?
There was a problem hiding this comment.
By reading the paragraph above, I thought these examples are to teach users to choose programming languages for android and iOS. So in that case, we should only use Android and iOS here.
However, we can add some examples to the above paragraph that explains the --platforms flag. Those examples can have different platforms just to explain the flag. WDYT?
There was a problem hiding this comment.
Oops. Yeah, that's what I get for just looking at the trees, not the forest.
src/docs/development/packages-and-plugins/developing-packages.md
Outdated
Show resolved
Hide resolved
|
|
||
| ### Add support to new platforms in an existing plugin project | ||
|
|
||
| To support new platforms in an existing plugin project, run `flutter create` with |
There was a problem hiding this comment.
=> To add support for specific platforms to an existing ...
src/docs/development/packages-and-plugins/developing-packages.md
Outdated
Show resolved
Hide resolved
src/docs/development/packages-and-plugins/developing-packages.md
Outdated
Show resolved
Hide resolved
| To create a plugin package, use the `--template=plugin` | ||
| flag with `flutter create`. | ||
|
|
||
| Starting from flutter 1.20.0: |
src/docs/development/packages-and-plugins/developing-packages.md
Outdated
Show resolved
Hide resolved
src/docs/development/packages-and-plugins/developing-packages.md
Outdated
Show resolved
Hide resolved
| Starting from flutter 1.20.0: | ||
| Use the `--platforms` option to specify all the platforms that the plugin | ||
| supports. Available platforms are: android, ios, web, linux, macos and windos. | ||
| If no platforms are specified, a plugin project supports no platforms will be created. |
There was a problem hiding this comment.
Done. Haha, it is intended. We don't want the user to accidentally create a plugin project supporting platforms that they don't want to support. We wanted to make it more explicit.
| ``` | ||
| ```terminal | ||
| $ flutter create --template=plugin -a java hello | ||
| $ flutter create --template=plugin --platforms=android,ios -a java hello |
There was a problem hiding this comment.
By reading the paragraph above, I thought these examples are to teach users to choose programming languages for android and iOS. So in that case, we should only use Android and iOS here.
However, we can add some examples to the above paragraph that explains the --platforms flag. Those examples can have different platforms just to explain the flag. WDYT?
|
|
||
| ### Add support to new platforms in an existing plugin project | ||
|
|
||
| To support new platforms in an existing plugin project, run `flutter create` with |
src/docs/development/packages-and-plugins/developing-packages.md
Outdated
Show resolved
Hide resolved
src/docs/development/packages-and-plugins/developing-packages.md
Outdated
Show resolved
Hide resolved
src/docs/development/packages-and-plugins/developing-packages.md
Outdated
Show resolved
Hide resolved
| supports. Available platforms are: android, ios, web, linux, macos and windos. | ||
| If no platforms are specified, a plugin project supports no platforms will be created. | ||
| As of Flutter 1.20.0, Use the `--platforms=` option followed by a comma separated list to | ||
| specify the platforms that the plugin supports. Available platforms are: android, ios, web, linux, macos, and windows. |
There was a problem hiding this comment.
Can we put the platforms in ticks so people know they are exact strings?
android, ios, web, linux, macos, and windows.
| ``` | ||
| ```terminal | ||
| $ flutter create --org com.example --template=plugin -a java hello | ||
| $ flutter create --org com.example --template=plugin --platforms=android,ios -a java hello |
There was a problem hiding this comment.
Just making sure. It's -a java hello but -i objc hello?
| ``` | ||
| ```terminal | ||
| $ flutter create --template=plugin -a java hello | ||
| $ flutter create --template=plugin --platforms=android,ios -a java hello |
There was a problem hiding this comment.
Oops. Yeah, that's what I get for just looking at the trees, not the forest.
…ated to `--platforms` (flutter#4344) * Update developing-packages.md Update the document to reflect changes in flutter/flutter#59507 * Update developing-packages.md Review * Update developing-packages.md
Update the document to reflect changes in flutter/flutter#59507
Fixes flutter/flutter#61405