-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
converted the example folder into a fully working flutter project #6
Conversation
This allows for building the plugin code (including the native C++ code) when running the example.
You might wonder, where all those new files come from. Here is what I did: I created a new blank flutter plugin, choosing the same name as your package: This creates a blank plugin project including an example code folder. I then copied the files The advantage now: You can load the whole project into Visual Studio Code und run the example there. This then also compiles the C++ code of the corresponding plugin code. Then I added the lines to the example runner's
This way the example can be run without the need to modify anything, showing the awesome new window header. I would appreciate this to be merged, because this also helps to contribute to your project. |
There are two different examples there: main.dart and switch.dart If we want to make it easy for people to run the example apps then maybe we should find a way that works for both examples. Do you have anything in mind that would work for both? I believe the current structure in this PR only works for main.dart The current examples folder structure mimics the one in the win32 package. Just to be clear, I like your proposal, just looking for a way to make it work for multiple examples. |
The win32 package is a library (not a flutter plugin). The example folder there obviously only serves as documentation. Here you can see the difference when creating a package versus a plugin: Flutter Package:
Flutter Plugin:
|
I'll check out, whether we can offer both examples via launch configurations... |
This allows the user to choose which exaple to run
Thank you! |
Thank you for contributing! |
This allows for building the plugin code (including the native C++ code) when running the example.
This fixes #5