Skip to content

Commit

Permalink
fix: add package parameter to generated asset provider method (#361)
Browse files Browse the repository at this point in the history
Closes #360

Co-authored-by: Olivier Revial <olivier.revial@steeple.com>
Co-authored-by: Daichi Furiya <dadadada.chop@gmail.com>
  • Loading branch information
3 people authored Apr 17, 2023
1 parent ef7ba1f commit b559901
Show file tree
Hide file tree
Showing 18 changed files with 180 additions and 18 deletions.
11 changes: 10 additions & 1 deletion examples/example/lib/gen/assets.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion examples/example_resources/lib/gen/assets.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion packages/command/example/lib/gen/assets.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion packages/core/example/lib/gen/assets.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion packages/core/lib/generators/assets_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,16 @@ class AssetGenImage {
);
}
ImageProvider provider() => AssetImage(_assetName);
ImageProvider provider({
AssetBundle? bundle,
String? package$packageParameter,
}) {
return AssetImage(
_assetName,
bundle: bundle,
package: package,
);
}
String get path => _assetName;
Expand Down
11 changes: 10 additions & 1 deletion packages/core/test_resources/actual_data/assets.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b559901

Please sign in to comment.