Repository: FlutterGen/flutter_gen

Issue:
[FR]: Support for useArtboardSize in RiveAnimation.asset
### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the problem

In our project we sometimes pass the useArtboardSize argument when calling RiveAnimation.asset. The flutter_gen generated code currently does not expose that option.

### Describe the solution

Update the generated code so that it's possible to pass the useArtboardSize argument.

### Additional context

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct



Fix patch:
diff --git a/examples/example/lib/gen/assets.gen.dart b/examples/example/lib/gen/assets.gen.dart
index 24cbc91bb..b28831623 100644
--- a/examples/example/lib/gen/assets.gen.dart
+++ b/examples/example/lib/gen/assets.gen.dart
@@ -383,6 +383,7 @@ class RiveGenImage {
     Alignment? alignment,
     Widget? placeHolder,
     bool antialiasing = true,
+    bool useArtboardSize = false,
     List<RiveAnimationController> controllers = const [],
     OnInitCallback? onInit,
   }) {
@@ -395,6 +396,7 @@ class RiveGenImage {
       alignment: alignment,
       placeHolder: placeHolder,
       antialiasing: antialiasing,
+      useArtboardSize: useArtboardSize,
       controllers: controllers,
       onInit: onInit,
     );
diff --git a/packages/core/lib/generators/integrations/rive_integration.dart b/packages/core/lib/generators/integrations/rive_integration.dart
index 9d831aa98..9830e4ff7 100644
--- a/packages/core/lib/generators/integrations/rive_integration.dart
+++ b/packages/core/lib/generators/integrations/rive_integration.dart
@@ -29,6 +29,7 @@ ${isPackage ? "\n  static const String package = '$packageName';" : ''}
     Alignment? alignment,
     Widget? placeHolder,
     bool antialiasing = true,
+    bool useArtboardSize = false,
     List<RiveAnimationController> controllers = const [],
     OnInitCallback? onInit,
   }) {
@@ -41,6 +42,7 @@ ${isPackage ? "\n  static const String package = '$packageName';" : ''}
       alignment: alignment,
       placeHolder: placeHolder,
       antialiasing: antialiasing,
+      useArtboardSize: useArtboardSize,
       controllers: controllers,
       onInit: onInit,
     );


Test patch:
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 fca1aba48..54841081b 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
@@ -39,6 +39,7 @@ class RiveGenImage {
     Alignment? alignment,
     Widget? placeHolder,
     bool antialiasing = true,
+    bool useArtboardSize = false,
     List<RiveAnimationController> controllers = const [],
     OnInitCallback? onInit,
   }) {
@@ -51,6 +52,7 @@ class RiveGenImage {
       alignment: alignment,
       placeHolder: placeHolder,
       antialiasing: antialiasing,
+      useArtboardSize: useArtboardSize,
       controllers: controllers,
       onInit: onInit,
     );