You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with pixel graphics that always require FilterQuality.none. Unfortunately, the image method on generated assets comes with a generated FilterQuality.low, so I have dozens of .image(filterQuality: FilterQuality.none) littering my code base.
Describe the solution
I would love to be able to configure FilterQuality, or really any other default parameters, for the generated functions. Ideally it would be added to the configuration file, ie. filterQuality: none would cause this to be set in the generated files.
Additional context
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
(not a maintainer) but the default value in Image.asset is also filterQuality = FilterQuality.low, so FlutterGen or not, you'd need to write Something(filterQuality = FilterQuality.none).
As a workaround you can extend the AssetGenImage class:
Now you can call myimage(...) instead of image(...) and you'll get your default. You may also want to add more parameters to myimage and pass them to image.
Is there an existing issue for this?
Describe the problem
I'm working with pixel graphics that always require
FilterQuality.none
. Unfortunately, theimage
method on generated assets comes with a generatedFilterQuality.low
, so I have dozens of.image(filterQuality: FilterQuality.none)
littering my code base.Describe the solution
I would love to be able to configure
FilterQuality
, or really any other default parameters, for the generated functions. Ideally it would be added to the configuration file, ie.filterQuality: none
would cause this to be set in the generated files.Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: