Repository: flutter
Issue: Rotated ColorFiltered extends to entire bounding box of transform
Labels: platform-web,has reproducible steps,P2,team-web,triaged-web,found in release: 3.13,found in release: 3.17

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

run the code below in 'code sample'

### Expected results

not see any red, as Transform.rotate should rotate the entire widget

### Actual results

the ColorFiltered extends to the smallest rectangle containing the Transform.rotate 

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyHomePage());
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({
    super.key,
  });

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage>
    with SingleTickerProviderStateMixin<MyHomePage> {
  double angle = 0;

  @override
  void initState() {
    super.initState();
    createTicker((elapsed) {
      setState(() {
        angle += 0.01;
      });
    }).start();
  }

  @override
  Widget build(BuildContext context) {
    return Directionality(
      textDirection: TextDirection.ltr,
      child: Container(
        color: Colors.green,
        child: Padding(
          padding: const EdgeInsets.all(400),
          child: Transform.rotate(
            angle: angle,
            child: ColorFiltered(
              colorFilter: const ColorFilter.mode(Colors.red, BlendMode.luminosity),
              child: Container(
                width: 100,
                height: 100,
                color: Colors.blue,
                child: Padding(
                  padding: const EdgeInsets.fromLTRB(20, 20, 0, 0),
                  child: Container(
                    color: Colors.grey,
                    width: 50,
                    height: 50,
                  ),
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>
<img width="1728" alt="Screenshot 2023-11-10 at 4 54 51 PM" src="https://github.com/flutter/flutter/assets/51892395/f26df5ad-c733-4d19-9428-d94639655d69">

</details>


### Logs

_No response_

### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
> flutter doctor -v
[✓] Flutter (Channel main, 3.17.0-4.0.pre.15, on macOS 14.0 23A344 darwin-arm64, locale en-US)
    • Flutter version 3.17.0-4.0.pre.15 on channel main at /Users/elih/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a68d3c3b02 (3 days ago), 2023-11-07 14:11:56 -0800
    • Engine revision f8961d2030
    • Dart version 3.3.0 (build 3.3.0-102.0.dev)
    • DevTools version 2.30.0-dev.1

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] VS Code (version 1.84.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.76.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 14.0 23A344 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 119.0.6045.123

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.
```

</details>