Repository: flutter
Issue: [google_maps_flutter ] Image Size/Ratio Issue with New BitmapDescriptor Methods in v2.9.0
Labels: p: maps,package,team-ecosystem,has reproducible steps,P2,triaged-ecosystem,found in release: 3.24

### Steps to reproduce

Ensure you are using Flutter version 3.22.3.
Add the google_maps_flutter: ^2.9.0 package to your pubspec.yaml.
Create a custom map marker

Use the BitmapDescriptor.asset or BitmapDescriptor.bytes method to generate a custom marker.
Provide an ImageConfiguration object to specify the desired size and other properties of the marker image.
Add the marker to a Google Map

Observe the map marker's size and aspect ratio when it is rendered on the map.

### Expected results

The map marker should appear with the correct size and aspect ratio as specified by the ImageConfiguration.

### Actual results

The map marker appears with an incorrect size and aspect ratio, resulting in a distorted image.
Reverting to the deprecated methods BitmapDescriptor.fromAssetImage and BitmapDescriptor.fromBytes results in the marker being displayed with the correct size and aspect ratio.

### Code sample

<details open><summary>Code sample</summary>

```dart
final imageConfiguration = createLocalImageConfiguration(
        context,
        size: const Size.square(32),
      );
      _selectedPinDescriptor ??= await BitmapDescriptor.assets(
        imageConfiguration,
        Assets.icon.mapPinSelected.path,
      );
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

effected one with new method:
<img width="391" alt="image" src="https://github.com/user-attachments/assets/6b34a302-36e1-40b4-8cd8-5dc1dcd568d3">

correct one with old method:
<img width="392" alt="image" src="https://github.com/user-attachments/assets/bf49c5d8-a694-4a05-ac43-f4a47698ec84">



</details>



### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[!] Flutter (Channel stable, 3.22.3, on macOS 14.1.2 23B92 darwin-arm64, locale en-DE)
    • Flutter version 3.22.3 on channel stable at /Users/saminsheyda/Development/tools/flutter_versions/3.22.3
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.5.0/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/saminsheyda/Development/tools/flutter_versions/3.22.3. Consider adding /Users/saminsheyda/Development/tools/flutter_versions/3.22.3/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b0850beeb2 (4 weeks ago), 2024-07-16 21:43:41 -0700
    • Engine revision 235db911ba
    • Dart version 3.4.4
    • DevTools version 2.34.3
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/saminsheyda/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.83.1)
    • VS Code at /Users/saminsheyda/Downloads/Visual Studio Code 2.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] VS Code (version 1.80.0)
    • VS Code at /Users/saminsheyda/Downloads/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (5 available)
    • sdk gphone64 arm64 (mobile)     • emulator-5556                        • android-arm64  • Android 13 (API 33) (emulator)
    • iPhone 14 (mobile)              • 5D9563A6-40B3-4251-81A8-503AE8186F50 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.1.2 23B92 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.1.2 23B92 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 127.0.6533.100
    ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
    ! Error: Browsing on the local area network for Samin’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.


```

</details>

Please investigate and resolve this issue so that the new BitmapDescriptor.asset and BitmapDescriptor.bytes methods correctly apply the ImageConfiguration as expected.