FlutterGen / flutter_gen

The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
https://pub.dev/packages/flutter_gen
MIT License
1.44k stars 142 forks source link

[Feature Request] Handling duplicate file names #59

Closed orestesgaolin closed 3 years ago

orestesgaolin commented 3 years ago

Sometimes it happens that for compatibility I need to use .png and .svg file with the same name e.g. splash.svg and splash.png.

It would be awesome to automatically generate different field names for these files e.g. splash_svg and splash_png.

lcdsmao commented 3 years ago

In the next release, if files have the same base name but the different extension will be handled properly. For example: https://github.com/FlutterGen/flutter_gen/blob/33e0a6c8377d37d7d365e0da455d02610546bdd0/test_resources/actual_data/assets_camel_case.gen.dart#L24-L27