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
Feature: Add package_name Field to flutter_assets configs for Asset Management
Explanation:
In Flutter, when using assets from a package, developers currently need to specify the package name for each asset individually in the Image widget or similar widgets. This can be repetitive and inefficient, especially when using multiple assets from the same package.
The proposed feature introduces a package_name field that can be added to the pubspec.yaml file under the flutter_assets: section. This field would allow developers to define the package name globally. As a result, assets could be used without repeatedly specifying the package name, improving code cleanliness and reducing redundancy.
Feature: Add
package_name
Field toflutter_assets
configs for Asset ManagementExplanation:
In Flutter, when using assets from a package, developers currently need to specify the package name for each asset individually in the
Image
widget or similar widgets. This can be repetitive and inefficient, especially when using multiple assets from the same package.The proposed feature introduces a
package_name
field that can be added to thepubspec.yaml
file under theflutter_assets:
section. This field would allow developers to define the package name globally. As a result, assets could be used without repeatedly specifying the package name, improving code cleanliness and reducing redundancy.For example, instead of writing:
each time an asset is used, the
package_name
could be set once in thepubspec.yaml
:Then, this would resolve to:
The text was updated successfully, but these errors were encountered: