flutter_i18n icon indicating copy to clipboard operation
flutter_i18n copied to clipboard

Is there a way to change output folder of i18n.dart?

Open Elvis5566 opened this issue 6 years ago • 4 comments

My project has a path dependency package, which has some common widgets for different apps. I'd like to move i18n to sub-package. Is there a way to change the output folder to my_package/lib/generated ?

Thank you

Elvis5566 avatar Apr 25 '19 10:04 Elvis5566

Why not have the my_package/lib/generated import the file instead?

noordawod avatar Apr 25 '19 13:04 noordawod

Since my_package has no dependency to my_app, I can only import i18n.dart via relative path. However, in this way, there are some shortcomings:

  1. IDE may not be able to auto import for me by using OPTION + ENTER.
  2. if I change file path, I'll have to revise those imports.

That's why I need a way to change output folder or i18n root folder (the folder that contains 'res' and 'lib')

Elvis5566 avatar Apr 26 '19 02:04 Elvis5566

Well, it's a good idea nonetheless. What do you think @long1eu? Could this be configurable, maybe in pubspec.yaml, so that the plugin picks it up automatically?

noordawod avatar Apr 26 '19 06:04 noordawod

How about having as option in IDE settings?

Purus avatar May 05 '19 15:05 Purus