Repository: flutter
Issue: [Web HTML] RadialGradient is rendered incorrectly when a Transform is applied
Labels: engine,platform-web,c: rendering,e: web_html,has reproducible steps,P3,team-web,triaged-web,found in release: 3.19,found in release: 3.22

### Steps to reproduce

Use code sample

> Flutter: v3.19.6  
> Browser: Chrome (v123.0.6312.59)  

### Expected results

Display normally in the web (HTML)

### Actual results

| ✅ CanvasKit | ❌ HTML |  
| :---: | :---: |  
| ![canvaskit](https://github.com/flutter/flutter/assets/32262985/4c555796-3561-4d83-ae52-a225aa1440a9) | ![html](https://github.com/flutter/flutter/assets/32262985/6d6031de-cce6-4b97-b876-d1a21eb63ad6) |  

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(home: Demo());
  }
}

class Demo extends StatelessWidget {
  const Demo({super.key});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Transform(
        alignment: AlignmentDirectional.center,
        transform: Matrix4.identity()
          ..setEntry(3, 2, 0.001)
          ..rotateX(10)
          ..rotateY(10),
        child: Stack(
          alignment: AlignmentDirectional.center,
          children: [
            Container(
              width: 300,
              height: 300,
              color: const Color(0xFF13547a),
            ),
            Container(
              width: 200,
              height: 200,
              decoration: BoxDecoration(
                gradient: RadialGradient(
                  colors: [
                    Colors.white.withOpacity(0.5),
                    Colors.white.withOpacity(0),
                  ],
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [版本 10.0.22621.3296], locale zh-CN)
    • Flutter version 3.19.6 on channel stable at xx
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (3 days ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at xx
    • Platform android-34, build-tools 34.0.0
    • ANDROID_SDK_ROOT = xx
    • Java binary at: xx
    • Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at xx

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.6)
    • Visual Studio at xx
    • Visual Studio Community 2022 version 17.9.34728.123
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2023.2)
    • Android Studio at xx
    • 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
    • android-studio-dir = xx
    • Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874)

[√] IntelliJ IDEA Ultimate Edition (version 2024.1)
    • IntelliJ at xx
    • Flutter plugin version 79.0.3
    • Dart plugin version 241.15845

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [版本 10.0.22621.3296]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 123.0.6312.59
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 123.0.2420.97
```

</details>