-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Flutter Wrapper Support. #26577
Flutter Wrapper Support. #26577
Conversation
Tentative TBR @jonahwilliams? |
Is this to address #25979 ? |
Some thoughts:
|
Is this related to https://github.com/passsy/flutter_wrapper? Does it offer significant advantages over that project that warrant including it in the Flutter tooling? Do we have permission from the author of the original work to incorporate it this way? |
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.
This code bears strong resemblence to code originally written by a different author under a different license. We need to make sure that author has signed a CLA and agrees to contribute the code to this repo under the terms of the CLA.
/cc @Hixie
This code has nothing to do with https://github.com/passsy/flutter_wrapper, i didn't know its existence before. It is my own original. This idea comes from gradle wrapper, when we started using Flutter, we have designed and used this method. |
The advantages it offers:
|
We talked to @liyuqian about this management method before. |
This PR has nothing to do with my passsy/flutter_wrapper besides that both have the same goal and both are very inspired by the gradle wrapper. The main difference to passsy/flutter_wrapper is that The proposed wrapper here requires I'd be very happy if any of those solutions would become part of the official flutter project. |
Thanks @passsy and thanks for clarifying @Sunzxyong I like the idea over all, and I definitely see how it could be usefu. @Sunzxyong - do you think it would make sense to publish this as a package on pub rather than making it part of the framework and tooling? One disadvantage of having it being integrated into Flutter tooling is that it seems possible that a user might switch to a version of Flutter that doesn't support this feature and get stuck - whereas if it's a pub (global) package, they can update it independently of Flutter and not end up getting stuck in a version of Flutter that's missing it (or in a version of Flutter where this implementation has a bug). |
Thanks @Sunzxyong for uploading the solution and thanks @dnfield for reviewing it! I agree that a separate pub package sounds like a better idea. That way, the team that's using an older Flutter (say 1.0) version could still use your solution 😄 |
Thanks to @dnfield @liyuqian and @passsy . 1. For pub packageUse this method, the flutterw_manager is a separate pub package.
After completion, We can generate or update wrapper files by running the following command in the Flutter project:
Advantages:Support for any Flutter project. Disadvantages:Need to set environment variables and activate pub package. 2. For flutter toolsThis method is supported by updating flutter_tools.
Advantages:Easy to use, just run the flutter wrapper command to generate the wrapper files in the Flutter project. Disadvantages:Need to update flutter_tools, so the old Flutter does not support. NoteThe methods above all generate wrapper files by running commands. Do we need to support the flutter-intellij plugin? like: |
I think it would make sense to make this available to people as an independent package that they can use with Flutter, but I think if we want to make this be part of Flutter itself, the way to do it is to have |
@Sunzxyong based on the discussion above I'm going to close this PR, but please don't hesitate to file further issues or feature requests for the tool. |
The Wrapper Workflow
Use the
Flutter Wrapper
to get the following benefits:Flutter Wrapper contains the following files:
The layout of the Flutter project with
Wrapper
is as follows:Develop in multiple projects
Develop in the team
More
See more information:Flutter Wrapper Workflow