FlutterAssetsGenerator icon indicating copy to clipboard operation
FlutterAssetsGenerator copied to clipboard

can't change generated file path

Open Eng-NUREDDIN opened this issue 1 year ago • 4 comments

flutter_assets_generator:

Optional. Sets the directory of generated localization files. The provided value should be a valid path on lib dir. Default: generated

output_dir: lib/core/app_constants

I tried this but it always gives me : Schema validation: Property 'output_dir' is not allowed also, i tried to change it from the tools but it won't accept sub-folder

image it gives me an error or it generates nothing.

Eng-NUREDDIN avatar May 01 '23 19:05 Eng-NUREDDIN

I can't reproduce your problem. After you edit the pubspec.yaml file, please try to save the file first before calling the plugin.

cr1992 avatar May 05 '23 01:05 cr1992

thanks for the reply, of course, I'm saving it before I'm calling the plugin.

Eng-NUREDDIN avatar May 05 '23 09:05 Eng-NUREDDIN

It works if you write the path like this: output_dir: core\\app_constants

Dpeska920 avatar May 06 '23 15:05 Dpeska920

Add the below lines of code inside your pubspec.yaml under the dev_dependances

flutter_assets_generator: output_dir: core\app_constants named_with_parent: false output_filename: images_resource class_name: ImagesResource path_ignore: ["assets/appIcons","assets/json"]

3kdeveloper avatar Sep 03 '23 16:09 3kdeveloper