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

[FR]: Possibility to create two classes of generated assets #590

Open
2 tasks done
abikko opened this issue Oct 15, 2024 · 2 comments
Open
2 tasks done

[FR]: Possibility to create two classes of generated assets #590

abikko opened this issue Oct 15, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@abikko
Copy link

abikko commented Oct 15, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the problem

Hello!

I created the two repos, first is UI-Kit, created assets using flutter_gen, exported assets.gen.dart file

And added to pubspec.yaml UI-Kit repo,

And I have a problem, that I have local assets in project and exported assets.gen.dart

And they both named "Assets", and Dart analyzer warns that we are importing assets.gen.dart from pubspec dependency and local assets.gen.dart

of course we have a solution with rename the local/remote repo assets.gen.dart, and rename the all occurences in project

But I wanna to do it, part by part

Describe the solution

So, I wanna recommend a solution to keep first version of assets.gen.dart, and mark it @deprecated('Use new assets.gen.dart instead')

and create the second, with new class name, which will include new assets

Additional context

Like adding new fields in pubspec.yaml for flutter_gen block


flutter_gen:
  assets:
    outputs:
      {first_assets_class_name}:
             package_parameter_enabled: true # <- Add this line.
       {second_assets_class_name}:
       and etc
  output: lib/assets/
  integrations:
    flutter_svg: true

Code of Conduct

  • I agree to follow this project's Code of Conduct
@abikko abikko added the enhancement New feature or request label Oct 15, 2024
@abikko
Copy link
Author

abikko commented Oct 15, 2024

Or another case.

We have old UI-kit, and updated UI-kit, and we don't wanna to update all in one time. Doing it again part by part.

@AlexV525
Copy link
Member

This sounds like out of the scope of the plugin. You can put your desired annotations wherever you want but the generator will consider too much if it has to implement such a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants
@AlexV525 @abikko and others