-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Support create for macOS (app and plugin) #40851
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
Support create for macOS (app and plugin) #40851
Conversation
|
I just realized that I didn't add macOS support to the plugin's pubspec.yaml, or the plugin example. Hold off on reviewing. |
jonahwilliams
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, we're almost there!
General approach LGTM. It's probably worth noting that 'flutter create .' won't add the override to an existing project, so I would expect more bugs to get filled here.
|
Ahh the plugins, good catch. |
|
Added the new schema conditionally for now, since that's the safer approach; started a discussion in the ecosystem chat about when we want to fully flip the switch on that. With that the plugin example just works (it just uses the app template to make the example, which is obvious in retrospect). |
Codecov Report
@@ Coverage Diff @@
## master #40851 +/- ##
==========================================
- Coverage 60.79% 58.18% -2.62%
==========================================
Files 192 192
Lines 18401 18688 +287
==========================================
- Hits 11187 10873 -314
- Misses 7214 7815 +601
Continue to review full report at Codecov.
|
codecov continues to reach... interesting conclusions about absolute coverage. |
|
I'll update flutter.dev/desktop and the FDE readmes soon to point to this so we start getting testing. |
Adds macOS support for `flutter create`: - Currently it is behind a hidden flag. - Adds a TargetPlatform workaround to lib/main.dart in the standard app template when enabled. - Supports `app` and `plugin`; `module` support doesn't yet exist for macOS in general. This will eliminate the need to use FDE's examples as templates on macOS. The templates are based on the current state of FDE's examples, with templating support added (and with adoption of the new application delegate in the app, which hadn't been done yet in FDE, eliminating some boilerplate from the template). Fixes flutter#30703
Description
Adds macOS support for
flutter create:appandplugin;modulesupport doesn't yet exist for macOS in general.This will eliminate the need to use FDE's examples as templates on macOS. The templates are based on the current state of FDE's examples, with templating support added (and with adoption of the new application delegate in the app, which hadn't been done yet in FDE, eliminating some boilerplate from the template).
Related Issues
Fixes #30703
Tests
I added the following tests: Tests that
createwith--macoscreates an app or plugin with macOS support, and does not otherwise.Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?