diff --git a/examples/example/lib/gen/assets.gen.dart b/examples/example/lib/gen/assets.gen.dart index a5c56a50..999745d1 100644 --- a/examples/example/lib/gen/assets.gen.dart +++ b/examples/example/lib/gen/assets.gen.dart @@ -250,7 +250,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/examples/example_resources/lib/gen/assets.gen.dart b/examples/example_resources/lib/gen/assets.gen.dart index 780ce997..3bc8a61d 100644 --- a/examples/example_resources/lib/gen/assets.gen.dart +++ b/examples/example_resources/lib/gen/assets.gen.dart @@ -105,7 +105,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package = 'example_resources', + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/command/example/lib/gen/assets.gen.dart b/packages/command/example/lib/gen/assets.gen.dart index a5c56a50..999745d1 100644 --- a/packages/command/example/lib/gen/assets.gen.dart +++ b/packages/command/example/lib/gen/assets.gen.dart @@ -250,7 +250,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/example/lib/gen/assets.gen.dart b/packages/core/example/lib/gen/assets.gen.dart index 1c7eb9fb..29aa6b86 100644 --- a/packages/core/example/lib/gen/assets.gen.dart +++ b/packages/core/example/lib/gen/assets.gen.dart @@ -250,7 +250,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/lib/generators/assets_generator.dart b/packages/core/lib/generators/assets_generator.dart index c23db8dc..19980190 100644 --- a/packages/core/lib/generators/assets_generator.dart +++ b/packages/core/lib/generators/assets_generator.dart @@ -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; diff --git a/packages/core/test_resources/actual_data/assets.gen.dart b/packages/core/test_resources/actual_data/assets.gen.dart index 17233280..5fc91ff7 100644 --- a/packages/core/test_resources/actual_data/assets.gen.dart +++ b/packages/core/test_resources/actual_data/assets.gen.dart @@ -207,7 +207,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/test_resources/actual_data/assets_camel_case.gen.dart b/packages/core/test_resources/actual_data/assets_camel_case.gen.dart index 65ed2d07..5e694478 100644 --- a/packages/core/test_resources/actual_data/assets_camel_case.gen.dart +++ b/packages/core/test_resources/actual_data/assets_camel_case.gen.dart @@ -139,7 +139,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/test_resources/actual_data/assets_change_class_name.gen.dart b/packages/core/test_resources/actual_data/assets_change_class_name.gen.dart index 8c46fc25..0bfe4b98 100644 --- a/packages/core/test_resources/actual_data/assets_change_class_name.gen.dart +++ b/packages/core/test_resources/actual_data/assets_change_class_name.gen.dart @@ -98,7 +98,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/test_resources/actual_data/assets_flare_integrations.gen.dart b/packages/core/test_resources/actual_data/assets_flare_integrations.gen.dart index bb1de62d..094bb4b2 100644 --- a/packages/core/test_resources/actual_data/assets_flare_integrations.gen.dart +++ b/packages/core/test_resources/actual_data/assets_flare_integrations.gen.dart @@ -85,7 +85,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/test_resources/actual_data/assets_ignore_files.gen.dart b/packages/core/test_resources/actual_data/assets_ignore_files.gen.dart index c90a80cd..37597e2e 100644 --- a/packages/core/test_resources/actual_data/assets_ignore_files.gen.dart +++ b/packages/core/test_resources/actual_data/assets_ignore_files.gen.dart @@ -77,7 +77,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/test_resources/actual_data/assets_lottie_integrations.gen.dart b/packages/core/test_resources/actual_data/assets_lottie_integrations.gen.dart index 60093888..6a12a9bd 100644 --- a/packages/core/test_resources/actual_data/assets_lottie_integrations.gen.dart +++ b/packages/core/test_resources/actual_data/assets_lottie_integrations.gen.dart @@ -85,7 +85,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/test_resources/actual_data/assets_no_integrations.gen.dart b/packages/core/test_resources/actual_data/assets_no_integrations.gen.dart index 14e4fd46..94cf227a 100644 --- a/packages/core/test_resources/actual_data/assets_no_integrations.gen.dart +++ b/packages/core/test_resources/actual_data/assets_no_integrations.gen.dart @@ -168,7 +168,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/test_resources/actual_data/assets_package_exclude_files.gen.dart b/packages/core/test_resources/actual_data/assets_package_exclude_files.gen.dart index 3885f460..f0b55dee 100644 --- a/packages/core/test_resources/actual_data/assets_package_exclude_files.gen.dart +++ b/packages/core/test_resources/actual_data/assets_package_exclude_files.gen.dart @@ -127,7 +127,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/test_resources/actual_data/assets_package_parameter.gen.dart b/packages/core/test_resources/actual_data/assets_package_parameter.gen.dart index 5cd5a336..9980ae20 100644 --- a/packages/core/test_resources/actual_data/assets_package_parameter.gen.dart +++ b/packages/core/test_resources/actual_data/assets_package_parameter.gen.dart @@ -108,7 +108,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package = 'test', + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/test_resources/actual_data/assets_rive_integrations.gen.dart b/packages/core/test_resources/actual_data/assets_rive_integrations.gen.dart index d9e0b151..52672c15 100644 --- a/packages/core/test_resources/actual_data/assets_rive_integrations.gen.dart +++ b/packages/core/test_resources/actual_data/assets_rive_integrations.gen.dart @@ -84,7 +84,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/test_resources/actual_data/assets_snake_case.gen.dart b/packages/core/test_resources/actual_data/assets_snake_case.gen.dart index de9d9dbb..b3073a65 100644 --- a/packages/core/test_resources/actual_data/assets_snake_case.gen.dart +++ b/packages/core/test_resources/actual_data/assets_snake_case.gen.dart @@ -140,7 +140,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/test_resources/actual_data/assets_svg_integrations.gen.dart b/packages/core/test_resources/actual_data/assets_svg_integrations.gen.dart index 2da7df5e..1ae7a916 100644 --- a/packages/core/test_resources/actual_data/assets_svg_integrations.gen.dart +++ b/packages/core/test_resources/actual_data/assets_svg_integrations.gen.dart @@ -96,7 +96,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName; diff --git a/packages/core/test_resources/actual_data/assets_unknown_mime_type.gen.dart b/packages/core/test_resources/actual_data/assets_unknown_mime_type.gen.dart index 8eecfe7d..194ad81f 100644 --- a/packages/core/test_resources/actual_data/assets_unknown_mime_type.gen.dart +++ b/packages/core/test_resources/actual_data/assets_unknown_mime_type.gen.dart @@ -83,7 +83,16 @@ class AssetGenImage { ); } - ImageProvider provider() => AssetImage(_assetName); + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } String get path => _assetName;