Repository: flutter
Issue: Android: Platform views with image is not rendering properly when applying padding
Labels: platform-android,a: animation,a: platform-views,has reproducible steps,P2,team-android,triaged-android,found in release: 3.24,found in release: 3.26

### Steps to reproduce


1. Open the attached project 
2. Run the android 
3. Click the floating action button


### Expected results

Padding need to apply smoothly like iOS

### Actual results

Platform view not rendering smoothly 

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  runApp(const MyApp());
}

const String viewType = '<native_view>';

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  var padding = EdgeInsets.zero;

  final Map<String, dynamic> creationParams = <String, dynamic>{};

  Widget getNativeView() {
    if (Platform.isIOS) {
      return UiKitView(
        viewType: viewType,
        layoutDirection: TextDirection.ltr,
        creationParams: creationParams,
        creationParamsCodec: const StandardMessageCodec(),
      );
    }

    return AndroidView(
      viewType: viewType,
      layoutDirection: TextDirection.ltr,
      creationParams: creationParams,
      creationParamsCodec: const StandardMessageCodec(),
    );
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text("Native view Example"),
        ),
        body: AnimatedContainer(
          duration: kThemeChangeDuration,
          curve: Curves.linear,
          padding: padding,
          alignment: Alignment.center,
          child: getNativeView(),
        ),
        floatingActionButton: Builder(builder: (builderContext) {
          return FloatingActionButton(
            onPressed: () async {
              setState(() {
                if (padding != EdgeInsets.zero) {
                  padding = EdgeInsets.zero;
                  return;
                }

                padding = const EdgeInsets.all(30);
              });
            },
          );
        }),
      ),
    );
  }
}
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

https://github.com/user-attachments/assets/8ba3dac5-aa93-4661-837c-7d4c44cdf7cc

</details>


<details open>
<summary>Project</summary>

[native_view_project-2.zip](https://github.com/user-attachments/files/17247572/native_view_project-2.zip)

</details>




### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
~/Playground/thefuseapp-mobile-client/android git:[Performace-Issue]
flutter doctor -v
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.6.1 23G93 darwin-arm64, locale en-IN)
    • Flutter version 3.24.3 on channel stable at /Users/bala-12858/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (3 weeks ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/bala-12858/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.11+0-17.0.11b1207.24-11852314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • 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.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.93.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.98.0

[✓] Connected device (6 available)
    • sdk gphone64 arm64 (mobile)     • emulator-5554                        • android-arm64  • Android 14 (API 34) (emulator)   
    • iPhone 16 Pro (mobile)          • 316C5626-7797-44C4-AADF-A9C5362A94A2 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-0 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.6.1 23G93 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.6.1 23G93 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 129.0.6668.71
    
[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>