Repository: FlutterGen/flutter_gen

Issue:
[BUG]: Initial value of FilterQuality in flutter_gen is different from Flutter(since ver 3.24.0)'s default value.
### Is there an existing issue for this?

- [X] I have searched the existing issues

### Version

5.8.0

### Command type

build_runner (Default)

### What happened?

In the image() method generated by Flutter Gen, the initial value of FilterQuality is **FilterQuality.low**, but in the Image() method of the Flutter SDK from Flutter 3.24.0, the initial value of filterQuality is **FilterQuality.medium**.

Details: [Flutter Official Release Notes](https://docs.flutter.dev/release/release-notes) -> [3.24.0 announcement](https://medium.com/flutter/whats-new-in-flutter-3-24-6c040f87d1e4)

It would be great if you could add a modification to follow the value of the Flutter SDK.

assets.gen.dart  in the flutter_gen generated file
```assets.gen.dart
class AssetGenImage {
  ~~~
  Image image({
    ~~~
    FilterQuality filterQuality = FilterQuality.low,
    ~~~
  }) {
    return Image.asset(
      ~~~
      filterQuality: filterQuality,
      ~~~
    );
  }
  ~~~
}
```

image.dart in the Flutter SDK
```image.dart
  Image.asset(
    String name, {
    super.key,
    AssetBundle? bundle,
    ~~~
    this.filterQuality = FilterQuality.medium,
    ~~~
  }) : image = ResizeImage.resizeIfNeeded(
         cacheWidth,
         cacheHeight,
         scale != null
           ? ExactAssetImage(name, bundle: bundle, scale: scale, package: package)
           : AssetImage(name, bundle: bundle, package: package),
       ),
       loadingBuilder = null,
       assert(cacheWidth == null || cacheWidth > 0),
       assert(cacheHeight == null || cacheHeight > 0);
```

As an aside, the link to the “[Code of Conduct](https://github.com/FlutterGen/CODE_OF_CONDUCT.md)” of the create "Issue: Bug Report" page seems to be a 404.

### Relevant a pubspec.yaml.

_No response_

### Relevant log output

_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 7791cc530..8793b313d 100644
--- a/examples/example/lib/gen/assets.gen.dart
+++ b/examples/example/lib/gen/assets.gen.dart
@@ -261,7 +261,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
diff --git a/examples/example_resources/lib/gen/assets.gen.dart b/examples/example_resources/lib/gen/assets.gen.dart
index 4095840f3..18f41a574 100644
--- a/examples/example_resources/lib/gen/assets.gen.dart
+++ b/examples/example_resources/lib/gen/assets.gen.dart
@@ -98,7 +98,7 @@ class AssetGenImage {
     bool isAntiAlias = false,
     @Deprecated('Do not specify package for a generated library asset')
     String? package = package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
diff --git a/packages/command/example/lib/gen/assets.gen.dart b/packages/command/example/lib/gen/assets.gen.dart
index cefd70208..a9cb53918 100644
--- a/packages/command/example/lib/gen/assets.gen.dart
+++ b/packages/command/example/lib/gen/assets.gen.dart
@@ -220,7 +220,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
diff --git a/packages/core/example/lib/gen/assets.gen.dart b/packages/core/example/lib/gen/assets.gen.dart
index f989572df..45389d813 100644
--- a/packages/core/example/lib/gen/assets.gen.dart
+++ b/packages/core/example/lib/gen/assets.gen.dart
@@ -218,7 +218,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
diff --git a/packages/core/lib/generators/integrations/image_integration.dart b/packages/core/lib/generators/integrations/image_integration.dart
index 266a4c84a..1de34fe79 100644
--- a/packages/core/lib/generators/integrations/image_integration.dart
+++ b/packages/core/lib/generators/integrations/image_integration.dart
@@ -61,7 +61,7 @@ ${isPackage ? "\n  static const String package = '$packageName';" : ''}
     bool isAntiAlias = false,
     ${isPackage ? deprecationMessagePackage : ''}
     String? package$packageParameter,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
diff --git a/packages/runner/example/lib/gen/assets.gen.dart b/packages/runner/example/lib/gen/assets.gen.dart
index 80e2a136a..13257364f 100644
--- a/packages/runner/example/lib/gen/assets.gen.dart
+++ b/packages/runner/example/lib/gen/assets.gen.dart
@@ -221,7 +221,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {


Test patch:
diff --git a/packages/core/test_resources/actual_data/assets.gen.dart b/packages/core/test_resources/actual_data/assets.gen.dart
index 482e6044f..551a35822 100644
--- a/packages/core/test_resources/actual_data/assets.gen.dart
+++ b/packages/core/test_resources/actual_data/assets.gen.dart
@@ -192,7 +192,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
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 7cd1a181a..4e7860042 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
@@ -114,7 +114,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
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 d8398dce5..2c53fa1d8 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
@@ -73,7 +73,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
diff --git a/packages/core/test_resources/actual_data/assets_directory_path.gen.dart b/packages/core/test_resources/actual_data/assets_directory_path.gen.dart
index d4ae7961a..d73883321 100644
--- a/packages/core/test_resources/actual_data/assets_directory_path.gen.dart
+++ b/packages/core/test_resources/actual_data/assets_directory_path.gen.dart
@@ -110,7 +110,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
diff --git a/packages/core/test_resources/actual_data/assets_flavored.gen.dart b/packages/core/test_resources/actual_data/assets_flavored.gen.dart
index c21cb10bd..8bca86da6 100644
--- a/packages/core/test_resources/actual_data/assets_flavored.gen.dart
+++ b/packages/core/test_resources/actual_data/assets_flavored.gen.dart
@@ -194,7 +194,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
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 c28e6832f..62c45a616 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
@@ -148,7 +148,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
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 efbca79e6..2357f79d6 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
@@ -103,7 +103,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
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 e322f52d2..f5ce84f77 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
@@ -104,7 +104,7 @@ class AssetGenImage {
     bool isAntiAlias = false,
     @Deprecated('Do not specify package for a generated library asset')
     String? package = package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
diff --git a/packages/core/test_resources/actual_data/assets_parse_metadata.gen.dart b/packages/core/test_resources/actual_data/assets_parse_metadata.gen.dart
index 1ef3bdb47..fdd90fc02 100644
--- a/packages/core/test_resources/actual_data/assets_parse_metadata.gen.dart
+++ b/packages/core/test_resources/actual_data/assets_parse_metadata.gen.dart
@@ -201,7 +201,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
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 a813b6883..3e5946b01 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
@@ -115,7 +115,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
diff --git a/packages/core/test_resources/actual_data/build_assets.gen.dart b/packages/core/test_resources/actual_data/build_assets.gen.dart
index 09e91354d..0f8b98ff4 100644
--- a/packages/core/test_resources/actual_data/build_assets.gen.dart
+++ b/packages/core/test_resources/actual_data/build_assets.gen.dart
@@ -185,7 +185,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
diff --git a/packages/core/test_resources/actual_data/build_empty.gen.dart b/packages/core/test_resources/actual_data/build_empty.gen.dart
index 09e91354d..0f8b98ff4 100644
--- a/packages/core/test_resources/actual_data/build_empty.gen.dart
+++ b/packages/core/test_resources/actual_data/build_empty.gen.dart
@@ -185,7 +185,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {
diff --git a/packages/core/test_resources/actual_data/build_runner_assets.gen.dart b/packages/core/test_resources/actual_data/build_runner_assets.gen.dart
index ce52a2181..4643eef27 100644
--- a/packages/core/test_resources/actual_data/build_runner_assets.gen.dart
+++ b/packages/core/test_resources/actual_data/build_runner_assets.gen.dart
@@ -185,7 +185,7 @@ class AssetGenImage {
     bool gaplessPlayback = true,
     bool isAntiAlias = false,
     String? package,
-    FilterQuality filterQuality = FilterQuality.low,
+    FilterQuality filterQuality = FilterQuality.medium,
     int? cacheWidth,
     int? cacheHeight,
   }) {