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

Load ImageAsset for different module #133

Closed Izudinalqasam closed 2 years ago

Izudinalqasam commented 2 years ago

I have a problem when load asset generated in one module and it can be accessed in another module. i have read generated file but not found to set package for assetimage

currently i using path generated image and making AssetImage from the path.

AssetImages( Assets.image.widgets.textDialogBox.textDialogBoxImage.path, package: "myPackage")

lcdsmao commented 2 years ago

Hi @Izudinalqasam Sorry for the lack of documentation. Have you tried setting package_parameter_enabled?

flutter_gen:
  assets:
    package_parameter_enabled: true

https://github.com/FlutterGen/flutter_gen/blob/main/README.md#default-configuration

Izudinalqasam commented 2 years ago

can i know where full doc about configuration is @lcdsmao ? i think i need more tweaks Configuration

lcdsmao commented 2 years ago

https://github.com/FlutterGen/flutter_gen/blob/main/README.md#default-configuration

The link I posted consisted of all available options. If you need further information please let me know. 🙂