flutter_gen
flutter_gen copied to clipboard
[BUG]: Error to generate assets
Is there an existing issue for this?
- [x] I have searched the existing issues
Version
5.11.0
Command type
build_runner (Default)
What happened?
When I set the output parameter, the class is not generated correctly. Expected: SDSAssets.icons.iconeArrowDown Actual: SDSAssets.iconsIconeArrowDown Without the output parameter, it generates correctly as Assets.icons.iconeCirclePause
Expected:
class $AssetsIconsGen {
const $AssetsIconsGen();
/// File path: assets/icons/icone-arrow-down.svg
SvgGenImage get iconeArrowDown => const SvgGenImage('assets/icons/icone-arrow-down.svg');
...
class SDSAssets {
const SDSAssets._();
static const String package = 'design_system_pkg';
static const $AssetsIconsGen icons = $AssetsIconsGen();
static const $AssetsLogosGen logos = $AssetsLogosGen();
}
Actual:
class SDSAssets {
const SDSAssets._();
static const String package = 'design_system_pkg';
/// File path: assets/icons/icone-arrow-down.svg
static const SvgGenImage iconsIconeArrowDown = SvgGenImage('assets/icons/icone-arrow-down.svg');
Relevant a pubspec.yaml.
flutter_gen:
output: lib/gen/
line_length: 120
integrations:
flutter_svg: true
assets:
outputs:
package_parameter_enabled: true
style: camel-case
class_name: SDSAssets
fonts:
enabled: true
flutter:
uses-material-design: true
assets:
- assets/icons/
- assets/logos/
Relevant log output
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
It's actually because I was using style: camel-case, but that wasn't the case before. Maybe a regression?
@Mairramer Could you setup a minimal repo so I can investigate?