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

Create files without a root folder #22

Open
khwgit opened this issue May 5, 2021 · 1 comment
Open

Create files without a root folder #22

khwgit opened this issue May 5, 2021 · 1 comment
Assignees
Labels
good first issue Good for newcomers question Further information is requested

Comments

@khwgit
Copy link

khwgit commented May 5, 2021

I want to create files without a root folder.
For example, I have a template structure:

|-- new_template
    |-- controllers
        |-- __templateName___page_controller.dart
    |-- pages
        |-- __templateName___page.dart

before creating a template, the project structure looks like this:

|-- src
    |-- controllers
        |-- welcome_page_controller.dart
    |-- pages
        |-- welcome_page.dart

after creating a template called sign_in, it can be:

|-- src
    |-- controllers
        |-- welcome_page_controller.dart
        |-- sign_in_page_controller.dart
    |-- pages
        |-- welcome_page.dart
        |-- sign_in_page.dart

Is there any way to achieve this?

Btw thank you for your amazing work! I really enjoy this plugin. 😀

@stegano stegano self-assigned this May 9, 2021
@stegano stegano added good first issue Good for newcomers question Further information is requested labels May 9, 2021
@stegano
Copy link
Owner

stegano commented May 9, 2021

Hi, @xanax92
Thanks for this extension 😀

Not the official way, but there is an alternative

It seems that you can use the variable allocation function suggested by tobiashochguertel, which is discussed in #20 (this is a function that still needs some modification, and we will update it as soon as possible).

Would you like to create a template like below and try it out? If the template extension version is 1.3.0 or higher, the $$var_ keyword will be recognized as a variable and a dialog to replace the variable will be exposed.

src
   -controllers
     -$$var_controller_name.dart
   -pages
     -$$var_pages_name.dart

Thanks 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants