Currently, FlutterGen is a fantastic tool for generating code related to assets, fonts, colors, and APIs in Flutter applications. However, it lacks the capability to generate localized assets easily.
In many internationalized applications, it's essential to provide localized versions of assets like images, with different languages or regions using the same asset but tailored to their needs. For instance, a logo used in English-speaking regions may be different from the one used in Portuguese-speaking regions.
This feature request aims to address this limitation by adding the ability to generate localized assets using FlutterGen.
Describe the solution
The solution involves enhancing FlutterGen to recognize and generate assets from localized directories. Specifically, it should:
Recognize language or region-specific directories within the assets directory, such as /assets/en for English and /assets/pt for Portuguese.
Allow users to provide assets in these localized directories. For example:
/assets/en/logo.png for the English version of the logo.
/assets/pt/logo.png for the Portuguese version of the logo.
Generate code that makes it easy to access these localized assets in Flutter, ensuring that the correct asset is used based on the application's current locale.
Additional context
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Is there an existing issue for this?
Describe the problem
Currently, FlutterGen is a fantastic tool for generating code related to assets, fonts, colors, and APIs in Flutter applications. However, it lacks the capability to generate localized assets easily.
In many internationalized applications, it's essential to provide localized versions of assets like images, with different languages or regions using the same asset but tailored to their needs. For instance, a logo used in English-speaking regions may be different from the one used in Portuguese-speaking regions.
This feature request aims to address this limitation by adding the ability to generate localized assets using FlutterGen.
Describe the solution
The solution involves enhancing FlutterGen to recognize and generate assets from localized directories. Specifically, it should:
Recognize language or region-specific directories within the assets directory, such as
/assets/en
for English and/assets/pt
for Portuguese.Allow users to provide assets in these localized directories. For example:
/assets/en/logo.png
for the English version of the logo./assets/pt/logo.png
for the Portuguese version of the logo.Generate code that makes it easy to access these localized assets in Flutter, ensuring that the correct asset is used based on the application's current locale.
Additional context
No response
Code of Conduct