-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add package parameter to generated asset provider method #361
fix: add package parameter to generated asset provider method #361
Conversation
@@ -570,7 +570,16 @@ class AssetGenImage { | |||
); | |||
} | |||
|
|||
ImageProvider provider() => AssetImage(_assetName); | |||
ImageProvider provider({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the one and only real change :
provider
method now sets the package if the flag is enabledprovider
method now accepts arguments that mirror theAssetImage
constructor
Note that the rest of the files are only updates of tests and examples
Codecov Report
@@ Coverage Diff @@
## main #361 +/- ##
=======================================
Coverage 98.26% 98.26%
=======================================
Files 20 20
Lines 693 693
=======================================
Hits 681 681
Misses 12 12
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@orevial |
Closes #360
What does this change?
Make generated Image.provider method accepts an optional package name, which default to current package when using
package_parameter_enabled
flagFixes #360 🎯
Type of change
Please delete options that are not relevant.
Checklist:
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
melos run unit:test
)melos run format
to automatically apply formatting)