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 commands to create new Flutter plugin/package/module #2963

Closed
KaungZawHtet opened this issue Nov 22, 2020 · 10 comments · Fixed by #3004
Closed

Add commands to create new Flutter plugin/package/module #2963

KaungZawHtet opened this issue Nov 22, 2020 · 10 comments · Fixed by #3004
Labels
in flutter Relates to running Flutter apps is enhancement
Milestone

Comments

@KaungZawHtet
Copy link

Can we get smoother experience on mixing c/c++ code in flutter project for dart ffi.

@KaungZawHtet
Copy link
Author

Microsoft already released c++ and cmake extension for vs code so I think it is not big challenge to make it.

@DanTup
Copy link
Member

DanTup commented Nov 22, 2020

Can you be more specific about the current issues or what you'd like to see improved?

@DanTup DanTup added the awaiting info Requires more information from the customer to progress label Nov 22, 2020
@KaungZawHtet
Copy link
Author

example, one click to generate ffi dev environment with some boilerplate code at both side (c++ side and dart side )

@KaungZawHtet
Copy link
Author

and one click build for both of dart and c++ part

@DanTup
Copy link
Member

DanTup commented Nov 23, 2020

@KaungZawHtet apologies - I'm not very familiar with what these projects look like, so it's not clear to me exactly what you're after.

one click to generate ffi dev environment with some boilerplate code at both side (c++ side and dart side )

Do you just mean a project template (similar to the Flutter: New Project command), or something that you would run in an existing project? What it the boilerplate code you're looking for?

one click build for both of dart and c++ part

For this, do you mean a compound launch configuration (in launch.json) so you can just press F5 to both compile C++ and then build and launch the Flutter app? So this could be a default launch.json in a template (such as mentioned above), or maybe a launch.json snippet to allow this to easily be added to an existing project?

@KaungZawHtet
Copy link
Author

I think my mensioned wishlist of dart ffi is not much different with embedding c++ code into android proj by the use of android ndk on Android studio. I think you can consider how ndk dev environment works.

@KaungZawHtet
Copy link
Author

Do you just mean a project template (similar to the Flutter: New Project command), or something that you would run in an existing project? What it the boilerplate code you're looking for?

Yes, like that. I think I used wrong terminology here. According to your words. It can go like this : Flutter: New dart ffi project

@DanTup
Copy link
Member

DanTup commented Nov 30, 2020

Are you able to share an example of what you would expect the full project to look like? I'm not very familiar with FFI or what's involved in setting it up in VS Code, so it'd be useful to have a reference to better understand exactly how this would look?

I'm wondering whether a more generic feature that allowed custom templates would work. For example, if there was a setting like:

"dart.projectTemplates": {
  "dart-ffi": { description: "A template with Dart FFI builds", source: "/path/to/folder" },
  "dart-ffi-github": { description: "A template with Dart FFI builds", source: "https://github.com/foo/project" },
}

Then when you invoke the "New Project" command, we could list these items, and then copy the folders (or make copies from the repo if a GitHub address) to the location you pick. This would be more extensible than adding just this specific project. What do you think?

@KaungZawHtet
Copy link
Author

KaungZawHtet commented Nov 30, 2020

Forget dart:ffi for now. We just need 3 new commands: Flutter: New Application Project (We have this one), Flutter: New Plugin Project, Flutter: New Package Project, Flutter: New Module Project and I think it's very easy for you to consider it. Reason why I point to different feature request is that according to official docs, new dart:ffi proj should start with Flutter: New Plugin Project . This is link.
Adding dart:ffi part into existing project can be different story.

Here is how those work in android studio:
Screen Shot 2020-11-30 at 23 46 45

@KaungZawHtet
Copy link
Author

So I think considering Flutter: New Plugin Project should be first before dart:ffi dev experience.

@DanTup DanTup added in flutter Relates to running Flutter apps and removed awaiting info Requires more information from the customer to progress labels Dec 2, 2020
@DanTup DanTup added this to the v3.18.0 milestone Dec 2, 2020
@DanTup DanTup changed the title Development with dart ffi Add commands to create new Flutter plugin/package/module Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in flutter Relates to running Flutter apps is enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants